President Ahmadinejad met with Marzouki on the sidelines of the extraordinary summit of the Organization of Islamic Cooperation (OIC) in Saudi Arabia on Tuesday.
The two presidents discussed bilateral ties, unity in the Muslim world and among Muslims as well as the issue of the Syrian unrest.
The meeting marks the highest level of official contact between the two countries after the victory of the Tunisian revolution in January 2011.
The emergency summit of the OIC in Mecca was held after the Saudi king called for the meeting in order to address major issues facing the Muslim world and the latest developments in the region.
The two-day summit opened on Tuesday, with the unrest in Syria topping the agenda.
The Jeddah-based OIC is the world’s largest Islamic body, with 57 members.