"While respecting the viewpoints of the great and brave Egyptian nation, the Islamic Republic of Iran offers its condolences to the Egyptian people, as well as Morsi's family and supporters," the statement said, according to the Foreign Ministry’s official website.
Egypt's first democratically elected president who was ousted after one year of divisive rule, died after collapsing in court on Monday, the attorney general said. He was 67.
He was buried Tuesday, as calls mounted for an independent investigation into the causes of his death after he collapsed in a Cairo courtroom, AFP reported.
Egypt’s former president, who was overthrown in 2013 after a year of divisive rule and later charged with espionage, was buried at a cemetery in eastern Cairo's Medinat Nasr, one of his lawyers said.
Abdel Moneim Abdel Maksoud said family members had washed Morsi's body and prayed the last rites early Tuesday morning at the Leeman Tora Hospital.
That lies near the prison where Egypt's first civilian president, a prominent Muslim Brotherhood member, had been held for six years in solitary confinement and deteriorating health.
The prosecutor general's office said the 67-year-old leader had collapsed and "died as he attended a hearing" Monday over alleged collaboration with foreign powers and militant groups.
Abdel Maksoud said that only around 10 family members and close Morsi confidants were present at the funeral, including himself.
The graveyard is in the same suburb as the largest massacre in Egypt's modern history, the August 2013 crackdown on Islamist sit-ins at two Cairo squares, weeks after Morsi's ouster by the military.
Over 800 people were killed in a single day as security forces moved against protesters demanding Morsi's reinstatement.
The attorney general's office said Morsi, who appeared "animated", had addressed the court Monday for five minutes before falling to the ground inside the defendants' glass cage.
The attorney general said Morsi had been "transported immediately to the hospital", where medics pronounced him dead – a version confirmed by a judicial source.
Since Morsi's overthrow on July 3, 2013, his former defense minister, now President Abdel Fattah al-Sisi, has waged an ongoing crackdown that has seen thousands of Muslim Brotherhood supporters jailed and hundreds facing death sentences.
Rights groups have demanded an independent probe into Morsi's detention conditions and death.
The Brotherhood's political wing – the Freedom and Justice Party – accused Egyptian authorities of "deliberately killing him slowly" in solitary confinement.
"They withheld medication and gave him disgusting food," it said in a statement. "They did not grant him the most basic human rights."
Morsi last saw his family in September 2018. A month later, one of his sons, Abdallah, was arrested.
Abdel Maksoud was the last member of his defense team to see him, in November 2017.
Rights group Amnesty International urged Egyptian authorities to open "an impartial, thorough and transparent investigation" into his death.
Human Rights Watch echoed that demand, saying Morsi had suffered years of "insufficient access to medical care" and calling on the UN Human Rights Council to investigate "ongoing gross violations of human rights in Egypt".