The Court of Appeals ruled the return of former prosecutor who was removed a constitutional declaration issued by Morsi.
The move had sparked a wave of protests and violent clashes, particularly in front of the Ettehadiya Palace in Cairo.
The court simultaneously rejected challenges filed by Talaat Abdallah, the current prosecutor general, who was appointed Morsi when he issued the controversial Constitutional Declaration.
Abdallah's former assistant, Hassan Yassin will act as acting prosecutor general until a new official is appointed, state-owned newspaper Al-Ahram reported in the wake of the announcement.