Morsi's jailbreak trial began at the Police Academy as he made his second appearance in court since the army overthrew him on July 3 amid mass protests against his rule.
The 62-year-old leader is facing separate trials for inciting murder of protesters at the presidential palace in 2012, for espionage and conspiring with foreign groups like Hamas and Hezbollah to commit terror acts and for insulting the judiciary.
He could face the death penalty if convicted.
Morsi also shouted at the judge, telling him: "who are you?" The judge simply said, "I'm the head of the Criminal Court" in response.
More From This Section
Morsi, along with other 21 Islamist defendants, spent the session in a sound-proof glass cage that was set up to prevent a repeat of the interruptions they made in their first court appearance last year, Ahram Online reported.
The rest of the defendants, including some 70 Palestinians, are on the run and being tried in absentia.
"I am the legitimate president of the country," he told the court "and this trial is not legal." The detainees chanted "Down with military rule."
TV footage showed Morsi in white prison garb, nervously pacing back and forth in a cage in the courthouse, alongside other Islamist defendants who shouted "null, null" at the judges, whose legitimacy they refuse to acknowledge.
In a surprise move, he appointed Islamist thinker Mohamed Selim El-Awa as his defence lawyer, who shall represent him in this trial and all three other cases Morsi faces.
The trial came a day after powerful army chief Field Marshal Abdel Fattah al-Sisi, who ousted Morsi, was backed by the army to run for presidency in the polls due by the end of April.