Safar Ali Baratlou's replacement as security deputy to Tehran's governor general was already under review, but the interior ministry said "a blind eye could not be turned" to what happened at the embassy.
The mission and the Saudi consulate in Mashhad, Iran's second city, were attacked and torched on January 2 in anger over Riyadh's execution of Nimr al-Nimr, a prominent cleric from the kingdom's Shiite minority.
"After initial investigations, failures... Were confirmed" in connection with the "assault on the Saudi embassy", the ministry said late Sunday, cited by the official IRNA news agency.
Riyadh cut diplomatic ties with Tehran after the incidents, deepening the crisis over the execution.
Also Read
Other Arab countries followed suit and severed or reduced relations with Iran, a predominantly Shiite state.
Iranian President Hassan Rouhani strongly condemned the attacks as "totally unjustifiable", urging judiciary chief Ayatollah Sadegh Larijani to deal with wrongdoers immediately.
About 50 people have been arrested over the attacks.
"Once and for all such assaults on the country's security, an insult to the establishment's authority and position, should be prevented by punishing perpetrators and those who ordered this blatant crime," Rouhani said in a letter to Larijani on Wednesday.
"We took immediate measures to help restore order... We also took disciplinary action against those who failed to protect the embassy," wrote Zarif.
Baratlou's sacking was followed by the replacement of General Hassan Arabsorkhi, head of police special forces in Tehran.
Officials have not said if that was linked to the embassy attack.