Rouhani also said that "Soleimani's martyrdom redoubled the determination to stand against America's bullying and defend Islamic values".
"There is no doubt that the great nation of Iran and the other free nations of the region will take revenge for this gruesome crime from criminal America," Rouhani said, referring to Iran's allies across the Middle East.
Soleimani's "martyrdom ... by the aggressor and criminal America has saddened the heart of the nation of Iran and all the nations of the region," he said in a statement posted on the Iranian government website.
In latest escalation in the Iran-US tension, the United States killed Soleimani, head of the elite Quds Force and architect of Iran's spreading military influence in the Middle East, in a strike at Baghdad airport. Muhandis, an adviser to Soleimani, was also killed.
The killing was authorised by US President Donald Trump, State Department announced later.
So far Trump has not reacted on officially on the killing but earlier in the Day he tweeted an image of the US flag.
Meanwhile, Iran's Supreme Leader Ayatollah Ali Khamenei also warned of "harsh revenge" waiting for the "criminals" who killed Soleimani.
His death, though bitter, would double the motivation of the resistance against the United States and Israel, he said.
Soleimani led the Quds Force, the foreign arm of Iran's elite Revolutionary Guards. He played a key role during in fighting in Syria and Iraq.
For over two decades Soleimani had been at the forefront of projecting the Islamic Republic's military influence across the Middle East.
Former Iraqi PM condemned the Soleimani's killing and said that it would light the "fuse of war".
"The assassination of an Iraqi military commander who holds an official position is considered aggression on Iraq ... and the liquidation of leading Iraqi figures or those from a brotherly country on Iraqi soil is a massive breach of sovereignty," Iraqi Prime Minister Adel Abdul Mahdi said.
Abdul Mahdi, whose government has the backing of Iran, said in a statement the US airstrike was "a dangerous escalation that will light the fuse of a destructive war in Iraq, the region, and the world."