Opinion polls suggest Ebrahim Raisi, a conservative Shia cleric who heads the judiciary, is the clear favourite.
Moderate former central bank governor Abdolnasser Hemmati is his main rival.
Dissidents and some reformists have called for a boycott, saying the barring of several contenders left Mr Raisi with no serious competition.
Supreme leader Ayatollah Ali Khamenei cast his vote early on Friday morning in Tehran and encouraged people to go the polls.
“Each vote counts … come and vote and choose your president,” he said. “This is important for the future of your country,”
There is widespread discontent among Iranians at the economic hardship they have faced since the US abandoned a nuclear deal with Iran three years ago and reinstated crippling sanctions.
A victory for one of the hardliners is not expected to derail talks in Vienna between Iran and world powers that are aimed at reviving the accord, which saw Iran agree to limit its nuclear programme in return for sanctions relief.
Mr Rouhani, a moderate who sought to engage with the West, cannot stand for re-election because he has served two consecutive four-year terms.