President Mohamed Morsy arrived in Tehran on Thursday, the first Egyptian leader to visit Iran since its Islamic revolution in 1979.
Iranian state television broadcast live pictures of Morsy's red-carpet welcome at Tehran's Mehrabad airport. He arrived to attend a summit of the Non-Aligned Movement that concludes on Friday.
The Syrian delegation at the summit walked out during a speech on Thursday by Morsy, who described the Syrian government as "oppressive," Al Jazeera television reported.
The Arabic satellite channel did not give further details in its brief headline and it was not immediately clear if the delegation returned after Morsy's speech finished.
Morsy criticized the government of Syrian President Bashar al-Assad in his speech at a summit of developing countries being held in Iran, a steadfast ally of Assad. Morsy said it was an "ethical duty" to support the Syrian people against the "oppressive regime" in Damascus.
"We all have to announce our full solidarity with the struggle of those seeking freedom and justice in Syria, and translate this sympathy into a clear political vision that supports a peaceful transition to a democratic system of rule that reflects the demands of the Syrian people for freedom."
Iran has presented its tenure of the movement as the failure of the United States to isolate it from the rest of the world, a message its most powerful figure, Ayatollah Ali Khamenei, will press home in an address to around 35 visiting heads of state on Thursday morning.
Diplomatic relations between Cairo and Tehran broke down immediately after Iran's revolution over Egypt's support for the overthrown Shah and its peace agreement with Israel.
As president, Morsy has so far refused to address the issue of whether ties would be upgraded with Iran, but has indicated he would pursue a more balanced foreign policy.
Analysts say Morsy's brief visit is designed to avoid any snub to Iran but improving relations with Tehran in the near future would send the wrong message to the United States and Israel.
Last week, Morsy spoke of forming a contact group to resolve the crisis in Syria, comprising Egypt, Iran, Saudi Arabia and Turkey, an initiative the Iranian leadership is keen to pursue.