Pezeshkian garnered 53.7% of votes, while his arch-conservative challenger received 44.3%.
Voter turnout stood at about 49.8%, according to the electoral authority.
Some 61 million people were eligible to vote for a successor to president Ebrahim Raisi, who died in a helicopter crash in May.
Friday’s run-off vote pitted Pezeshkian and Jalili against each other after none of the candidates gained an absolute majority in the first round on June 28.
The president is only number two in Iran’s power structure as Supreme Leader Khamenei functions as the head of state and has the final say in all strategic matters. He is also commander-in-chief of Iran’s armed forces.