"I am apologising you for all the shortcomings...in the past years during my time as foreign minister ... I thank the Iranian nation and officials," he wrote on his Instagram page jzarif_ir.
Zarif played an important role in striking a 2015 nuclear deal between Iran and six world powers.
But he came under attack by anti-Western hardliners in Iran after the United States pulled out of the agreement last May and reimposed sanctions that were lifted under the deal.
Iran's semi-official Tasnim news agency said "some sources have confirmed Zarif's resignation", but it was not clear whether President Hassan Rouhani would accept it.