The president made the remark on Sunday evening in a meeting with Azeri clerics, thinkers and scholars in Baku, adding that these commonalities are the basis of the strong bond between the two nations and governments.
He added that common religion and culture are the source of trust and cooperation between Tehran and Baku.
Rouhani further referred to Islam as the religion of fraternity and security, stressing that spread of terror and disunity in the name of Islam is but a plot aimed at fomenting Islamophobia.
He underlined the role of Muslim scholars in curbing discord and preventing Muslim youth from ideological deviation.
The Iranian president also underscored that Sunni and Shia Muslims are all brothers and members of the family of the Muslim Ummah.
Rouhani is in Baku on an official visit for talks on bilateral cooperation between Iran and Azerbaijan.
He is also scheduled to hold a trilateral meeting with his Azeri and Russian counterparts, Ilham Aliyev and Vladimir Putin.