The State TV in Egypt announced the death of former president Mohamed Morsi while attending his trial on Monday.
Morsi was taken to the hospital and died during his transfer to hospital, the TV said.
Morsi had asked the judge for speaking and after the adjournment of the session he had a fainting spell and died.
The TV said that measures are being taken to bury his body.
Egyptian sources said the Morsi family had announced that they would bury him.
Former Egyptian President Mohamed Morsi assumed power on June 30, 2012 after the first elections in Egypt after the overthrow of former President Hosni Mubarak to be the first president after the revolution of 25 January 2011 and the fifth president to take power in Egypt.
Morsi was president for only one year and was ousted after the June 30, 2013 events.
Protests against Morsi's rule erupted when he gave himself broad powers in late November 2012 by presidential decree. The protests intensified when the Constituent Assembly, which was quickly dominated by Islamists, adopted a constitution amidst the boycott of liberals, secularists and the Coptic Church.
Morsi is tried in several cases, including the charge of communicating with a foreign country.