Former Egyptian president Mohamed Morsi suffered a heart attack during a trial for an espionage case in Cairo on Monday.
Morsi was addressing the court and spoke for five minutes before he fainted and fell into a coma, according to Egypt's state TV.
When he arrived at the hospital, he was already dead.
He had been in prison since 2013 when he was ousted by the military following massive protests against his rule.
A strict Islamist and senior member of the Muslim Brotherhood, Morsi was voted into power in June 2012, with the election following the Arab Spring uprising.
After Morsi was ousted, he received multiple prison sentences on various politicized charges, including conspiring with Palestinian group Hamas, the Iranian Revolutionary Guard and other foreign organizations.
Human rights groups have questioned Morsi's prison conditions and criticized the medical care he received.
Last year, a group of British lawmakers reviewing his treatment concluded the prison was inadequately managing his diabetes and liver disease.
They also said he was being treated inhumanely.
Morsi was also denied access to communicate with the outside world.
During his six years in prison, he was only allowed three visits.
The Muslim Brotherhood released a statement on Monday that said it held Egyptian President Abdel Fattah el-Sisi and his regime accountable for killing Morsi and demanded an independent review into the circumstances of his death.
Hong Yoo, Arirang News.