Former President Mohamed Morsi died on Monday after he suffered a heart attack.
According to Egyptian State Television, Morsi who died at the age of 67 suffered a heart attack following the court hearing in his espionage trial ended.
His body has been transferred to a hospital in preparation for burial arrangements.
The ousted Morsi asked to speak at the session, and the judge gave him permission.
He then reportedly fainted in court and was later pronounced dead.
Morsi was elected in democratic elections in 2012 after the 2011 revolution ousted dictator Hosni Mubarak. He was overthrown in a coup by the Egyptian military, who installed current President Abdel Al-Sisi as the leader.