Mr Rouhani’s election has been endorsed by Supreme Leader Ayatollah Ali Khamenei at a ceremony in the capital, Tehran.
He won the presidential poll in June, promising to reform and to put an end to Iran’s international isolation.
The ceremony marks the handover of power, but his public inauguration does not take place until Sunday.
The 64-year-old is a former nuclear negotiator for Iran and was an Islamic activist before the 1979 Revolution.
Speaking at the ceremony, Mr Rouhani said: ”I have assumed this responsibility with the support of those people who want change, who want a better life, away from corruption, poverty and discrimination, people who want more respect and dignity, and hope in a secure future.”
He has the support of Iran’s reform movement, which wants the new president to release political prisoners and have international sanctions lifted.
But while he may be taking over as president, he will not be Iran’s main decision-maker, says the BBC’s Iran correspondent James Reynolds in London.
In the Islamic Republic, it is the Supreme Leader, not the president, who has the final say, our correspondent adds.
The day before he took office, Mr Rouhani said Israeli occupation was an “old wound on the body of the Islamic world”, as Iran marked its annual Jerusalem (Quds) Day.
His remarks echo those of other Iranian leaders on the day dedicated to supporting the Palestinians and denouncing Israel.
Iran has denied Israel’s right to exist since the 1979 Islamic revolution.
In his last interview before stepping aside on Friday, Mr Ahmadinejad also attacked Israel, warning of “storm brewing” in the region that would uproot Zionism, according to AFP news agency.
Many Iranians believe Mr Ahmadinejad, elected twice in controversial polls, has put Iran on the path to economic ruin and confrontation with the outside world.