On Tuesday, the Egyptian appeals court upheld a lower court decision to dismiss the prosecutor general appointed by Morsi, judicial sources and the state news agency MENA said.
The decision removed public prosecutor Talaat Abdallah and ordered the return of former prosecutor Abdel Meguid Mahmoud to his post.
Morsi sacked Mahmoud in November, in a decree that granted the president sweeping powers and placed his decisions beyond judicial review. Mahmoud was then replaced by current prosecutor general, Talaat Abdallah.
Abdallah's appointment was fiercely contested by the opposition, which accused him of bias towards the government and of using his position to prosecute critics of the president while turning a blind eye to human rights abuses.
Mahmud's sacking had intensified long-running tensions between the presidency and the judiciary which accuses Morsi of interfering in its independence.
Since coming to power a year ago, Morsi has battled with the judiciary, the media and the police.
Also on Tuesday, the UN human rights office called on Morsi's government to listen to the demands of the Egyptian people and engage in a "serious national dialogue" to defuse the crisis.
Rupert Colville, spokesman of UN High Commissioner for Human Rights Navi Pillay, also said the role of the Egyptian military was crucial. "Nothing should be done that would undermine democratic processes," he told reporters on Tuesday.
On Monday, the armed forces gave Morsi and all political forces a 48-hour ultimatum to meet the demands of the people before intervening with a political roadmap in the wake of the recent mass anti-government protests nationwide.
However, the Egyptian president dismissed the army’s statement as an attempt to “deepen divisions and threaten the social peace.”
Morsi also announced in a statement issued on Tuesday that he would continue with his own plans for national reconciliation.
The massive protests came on the first anniversary of Morsi’s inauguration as president following the 2011 revolution that toppled the Western-backed regime of Hosni Mubarak.