The veteran diplomat first offered a vague Instagram post with an “apology” for his “inability to continue to his service”.
The post included a drawing of Fatima, the daughter of the Prophet Muhammad, as Monday marked the commemoration of her birth.
Minutes later, a Foreign Ministry spokesman confirmed to the state-run IRNA news agency that Zarif had resigned but gave no reason for his departure.
Zarif’s resignation, if accepted by Iran’s relatively moderate President Hassan Rouhani, would leave the cleric without one of his main allies in pushing the Islamic Republic toward more negotiations with the West.