Al-Maliki met Grand Ayatollah Ali al-Sistani on Saturday in Najaf, 160km south of Baghdad.
According to the cleric's office, al-Sistani said: "If the government does not do its duty in imposing security and order to the people and protecting them, it will give a chance to other powers to do this duty and this is a very dangerous matter."
In July, al-Sistani was credited with restraining the majority Shia community from widespread retaliation against Sunnis following horrific attacks on Shia civilians.
The discussion came two days after a barrage of co-ordinated attacks across mainly Shia eastern Baghdad killed 64 people and wounded 286.
Shahristani to stay
In remarks after the meeting, al-Maliki announced that four Iraqi ministries will be affected by a planned cabinet reshuffle.
Maliki said Hussein al-Shahristani, Iraq's oil minister, whose future has been the subject of behind-the-scenes speculation, will stay on.
Shahristani, a close ally of al-Maliki, was criticised by some politicians for failing to tackle a fuel-shortage crisis efficiently.
The cabinet reshuffle, which will include the transport ministry, will need parliamentary approval.
Abu Ghraib handover
In a separate development, Iraq's government has formally taken over the Abu Ghraib prison, site of an abuse scandal by US soldiers.
Coalition forces transferred operations of Abu Ghraib to the Iraqi justice ministry on Friday.
On Saturday, Ali al-Dabbagh, a spokesman for al-Maliki, said: "The Abu Ghraib detention facility was handed over to the Iraqi government. It is now empty of any detainees."
Busho Ibrahim, deputy justice minister, said last week that the detainees at Abu Ghraib had been moved to a new $60m detention facility that had been built as part of Camp Cropper, near Baghdad International Airport.
Lieutenant-Colonel Keir Kevin Curry, spokesman for detainee operations, said multinational force authorities still had about 13,000 detainees in their custody.
In contrast to the prison handover, authorities postponed a highly anticipated ceremony on Saturday in which Iraq's defence ministry was to assume operational control of the country's armed forces command from the US-led forces.
The ceremony, which had been set to take place in the morning, was first delayed until later in the day, then postponed until Sunday.
Spokesman Lieutenant-Colonel Barry Johnson said the reason for the postponement was "miscommunication" in the timing of the ceremony.
Handing over control from the coalition to Iraqi authorities is a key part of any eventual withdrawal of US soldiers in the country.
In other news, Aljazeera said the decision by the Kurdish province's president, Massoud Barzani, to replace the Iraqi flag with the Kurdish flag has been criticised by Saleh al-Mutlaq, the leader of the predominantly Sunni Iraqi Front for National Dialogue.
Al-Mutlaq said that his fears came true when the decision was made, adding that that the repercussions could be negative.
Aljazeera also quoted al-Mutlaq as criticising the Iraqi prime minister, Nuri al-Maliki, for purportedly taking instructions from the country's top Shia cleric, Ali al-Sistani.