Before the unscheduled visit, Cheney's public schedule was for him to stop in the United Arab Emirates, before moving on to Saudi Arabia, Egypt and Jordan.
US officials said Cheney's mission was to get a sense of the situation on the ground in Iraq and to give the message that more work was needed on the political front to overcome divisions and delays.
Cheney was briefed on conditions by General David Petraeus, the US commander in Iraq, and Ryan Crocker, the new US ambassador to Baghdad.
The discussions included a renewed request that the Iraqi parliament not take a two-month vacation.
Crocker said that urging the parliament to stay in session through these difficult times was clearly on the vice-president's agenda.
He said: "For the Iraqi parliament to take a two-month vacation in the middle of summer is impossible to understand."
Cheney was due to have lunch with al-Maliki and Iraqi officials and then have dinner with them at the US embassy.