Iran State television broadcast footage of Ahmadinejad accompanying Esfandiar Rahim Mashaei to the electoral registry Saturday, the Telegraph reported.
The president reportedly tried to stave off any possible complaints over his appearance by asking an aid to "tell them I'm on a day off work."
The members of the Guardian Council, Iran's constitutional watchdog, complained Ahmadinejad had broken public funding rules by appearing with Mashaei to register, and could face 74 lashes or six months in prison.
Ahmadinejad's opponents have claimed Mashaei's campaign has been funded with public money.
The complaint against the president was likely fueled by his feud with Iran's religious leadership and the Supreme Leader Ayatollah Ali Khamenei, who controls the Guardian Council.
Religious conservatives have been critical of Mashaei's nationalism and supposed leniency toward Israel, and accuse him of attempting to undermine Islamic rule.
The Guardian Council must approve all 680 candidates for the election.
Mashaei serves as the president's chief of staff and shares a close personal relationship with Ahmadinejad's family, cemented by the marriage of their children.
Notable deaths of 2014 [PHOTOS]