The Pharaohs were the pre-tournament favourites but lost 1-0 in Cairo after Thembinkosi Lorch’s 85th minute winner.
Egypt Football Association president Hany Abo Rida has also resigned, saying it was a “moral obligation”.
Mexican Aguirre, 60, was appointed in August 2018, succeeding Hector Cuper, who left after their World Cup exit.
Speaking after Saturday’s defeat, Aguirre, who still had three years left on his contract, said: “Of course I am responsible.
“I think the game was open and there were chances for both teams. The only difference was the goal for South Africa.”