A former top figure in the now-banned Islamist movement Muslim Brotherhood, Morsi was in court for a hearing on charges of espionage. He was 67.
Morsi was overthrown following mass protests a year after he took office as the country's first democratically elected leader.
He had remained in custody since then.
After his removal from power, Egyptian authorities launched a crackdown on his supporters and the Muslim Brotherhood.
The hearing in the capital, Cairo, was related to charges of espionage emanating from suspected contacts with the Palestinian Islamist group Hamas, according to state television.