"I will vote for Mr Rouhani in the presidential election," Jahangiri said as he announced he was withdrawing his candidacy.
"I have completed my historic duty and, together with you, I will vote for Rouhani to help continue on the path to progress for this country," he told a crowd of several thousand people gathered in the southern city of Shiraz.
"Vote for Rouhani because he is the man for difficult situations... I ran as candidate to make the voice of reformists heard," said Jahangiri.
His decision comes one day after Tehran mayor Mohammad Bagher Ghalibaf withdrew from the race, paving the way for a head-to-head battle between Rouhani and conservative cleric Ebrahim Raisi.
Jahangiri, a 60-year-old confidante of the moderate president, was a surprise last-minute entry for Friday's election.
It was assumed Jahangiri ran to back up Rouhani in pre-election debates and he said at his registration that he stood "side-by-side" with the president who is seeking a second four-year mandate.