Ali Akbar Javanfekr, former director of the official Islamic Republic News Agency, left the presidential race after consulting with Ahmadinejad, Iran's state-funded broadcaster Press TV reports.
More than 600 people registered as candidates for president. Ahmadinejad is ineligible to compete because of term limits.
Javanfekr was arrested in 2011 but freed after Ahmadinejad intervened. He was arrested again in September and charged with publishing remarks viewed as contrary to Islamic principles. He was barred from media activities for three years.
Javanfekr said he was throwing his support behind Esfandiyar Rahim-Mashaei, Ahmadinejad's former chief of staff.
The 12-member Guardian Council said Ahmadinejad violated the law when he accompanied his former chief of staff to register as a candidate last weekend. Ahmadinejad defended the measure by saying it was a right to free expression on his day off, Press TV reports.
Any Iranian national can register as a candidate so long as they have political or clerical credentials. The Guardian Council has the ultimate say on the candidate list, however.
Elections are scheduled for June 14.
Duggar sisters unveil Christian dating rules in new book
Beautician charged with giving client fatal silicone butt injection