"This is an extremist, terrorist group that is acting savagely," Rouhani said live on state television.
The president did not elaborate on what steps Iran would take to help thwart a bid by fighters from the Islamic State of Iraq and the Levant (ISIL) to push toward Baghdad after seizing several cities and towns to the north.
But he said he would head to a meeting of Iran's Supreme National Security Council immediately after his speech.
"For our part, as the government of the Islamic Republic of Iran ... We will combat violence, extremism and terrorism in the region and the world," said an agitated Rouhani.
More From This Section
The president spoke even as the heavily armed militant group on Thursday seized a string of towns near Baghdad after a lightning offensive that began in Nineveh province late on Monday.
Iran is seen as an ally of Iraq's Shiite prime minister, Nuri al-Maliki, whose government's swift loss of control has raised international alarm.
"Unfortunately, they name themselves Muslim and brand their way as jihad, and say they are implementing the way of Koran and Islam," said Rouhani, insisting that the religion's message was one of peace.
Yesterday, Foreign Minister Mohammad Javad Zarif had condemned the "murder of Iraqi citizens" as he offered Baghdad "support" against terrorism. He too did not elaborate.
ISIL jihadists are also fighting to overthrow Tehran's close ally President Bashar al-Assad in Syria.