Mr Annan warned both countries that the conflict could spread across the region if the violence was not stopped.
The tour came after talks with Syrian President Bashar al-Assad on Monday which he described as "constructive".
Meanwhile, Russia is sending warships to its naval base at Syria's port of Tartus, military sources said.
Correspondents say the move is designed to show that Russia - an ally of the Syrian government - will protect its interests in the region.
After meeting Foreign Minister Ali Akbar Salehi in Tehran on Tuesday, Mr Annan said he was seeking Iran's "support and co-operation" to resolve the crisis.
He said Tehran could play a "positive role" in helping end the bloodshed.
Mr Salehi told reporters that his country was "part of the solution".
But the US, which accuses Iran of providing assistance to Damascus, cast down on the claim.
Activists said violence on Monday claimed dozens more lives "I don't think anybody with a straight face could argue that Iran has had a positive impact on developments in Syria," White House spokesman Jay Carney said on Tuesday.
Later, Mr Annan touched down in Baghdad for a meeting with Iraqi Prime Minister Nouri Maliki.
The former UN secretary general said the two men had discussed "the need to do everything possible to stop the killing", but did not elaborate.
Mr Annan is expected to brief the UN Security Council in New York on the outcome of this latest round of talks from his Geneva base on Wednesday.
He has admitted his plan to find a political solution in Syria has not succeeded. A ceasefire was supposed to begin in mid-April as part of his six-point peace initiative.
Following talks with President Assad on Monday, Mr Annan said the pair had agreed a new approach to ending the violence.
"We agreed an approach which I will share with the armed opposition," he said in Damascus.
"I also stressed the importance of moving ahead with a political dialogue, which the president accepts."
President Assad had suggested ending the conflict "step by step", Mr Annan said.
This would involve trying to contain the violence in the worst affected areas and building on it "from the ground up".
But even with few details, many observers have expressed scepticism that any such plan would succeed.
Meanwhile, the conflict claimed more lives on Tuesday, including a member of the Syrian Arab Red Crescent.
The violence also once again spilled into Lebanon, with shooting and shelling by Syrian forces being reported in northern areas. Lebanon said it would send more troops to reinforce the border.
Meanwhile, Russia has sent a naval flotilla of seven warships led by an anti-submarine destroyer to its Syrian base at Tartus, according to Interfax news agency.
The US said it was aware of the move, but did not see cause for concern.
According to sources cited by Interfax, the ships were carrying marines on a training mission, as well as food and fuel for the maintenance and repair base.
BBC diplomatic correspondent Jonathan Marcus says that, by any standards, the flotilla is a significant naval deployment.
He says Moscow appears to be sending a signal to the Syrian regime that it is putting a force into the Mediterranean that could be used to extricate Russian personnel and equipment from their naval base, should it be required.
Equally Moscow is signalling to the US and the West that it intends to defend its interests in the region, our correspondent adds.