Morsi also appointed a senior judge, Mahmoud Mekki, as vice president.
The decisions announced Sunday are effective immediately.
Al Jazeera's correspondent, Sherine Tadros, reporting from Cairo, said the president's spokesperson made the surprising announcement on state television.
“The other shock announcement was 'the retiring' of Sami Enan, the chief of staff.
“There will be a lot of questions asked, especially if Morsi is able to do this,” Al Jazeera correspondent said.
“In the coming hours, we will find out how this decision came about. All of this has happened very fast, and it was unexpected.”
Spokesman Yasser Ali said in a news conference aired on state TV that Morsi appointed a new defense minister, Abdel-Fattah el-Sissi.
He replaces Field Marshal Hussein Tantawi – the head of the Supreme Council of the Armed Forces (SCAF).
Tantawi was defense minister for nearly two decades under former President Hosni Mubarak. The military council's No. 2, Chief of Staff Sami Annan, was also ordered to retire.
Morsi, who was officially sworn in as Egypt’s president on June 30 following run-off presidential polls of June 16-17, has called on all Egyptians to unite, saying the revolution will continue.
“I call on you, great people of Egypt...to strengthen our national unity,” he said in his first address following his electoral victory, which had been announced on Jun 24, adding that national unity “is the only way out of these difficult times.”
SCAF took power in February 2011 after the Egyptians launched a revolution against the pro-Israeli regime in January, which eventually brought an end to the 30-year dictatorship of Mubarak.
Days before Egypt’s first democratically elected president, Morsi, was sworn in, the Muslim Brotherhood-led parliament was dissolved by SCAF-backed Supreme Constitutional Court.
Pundits say the military and the high court are trying to undermine the powers of the new president in order to hang on to power.
(Sources: agencies)