The Court of Cassation, EgyptÂ s highest appeals court, issued the verdict, MorsiÂ s lawyer and a judicial official told AFP.
The court ordered a retrial in the case, MorsiÂ s lawyer Abdel Moneim Abdel Maqsoud told AFP, adding: “The verdict was full of legal flaws.”
The ruling also quashed sentences against 22 others, including three death sentences against Muslim BrotherhoodÂ s deputy head Khairat al-Shater and other senior officials from the now banned group.
A court had sentenced Morsi to life in June 2015 on charges of spying for Iran, Lebanese militant group Hezbollah and the Palestinian Islamist movement Hamas.
The decision was the latest legal victory for the 65-year-old, who has been convicted and sentenced in all cases against him since being removed from office in 2013.
“Most of the trials in which the former president has been convicted are not built on sufficient evidence: the prosecutor relies on security services reports,” University ofCairo political sciences Professor Mustafa Kamel al-Sayyed told AFP on Tuesday.
Morsi was EgyptÂ s first freely elected leader, taking power after the 2011 uprising that toppled longtime strongman Hosni Mubarak.
But his year in office proved deeply divisive and he was overthrown by then-army chief and now President Abdel Fattah al-Sisi following mass street protests.
A crackdown on MorsiÂ s Muslim Brotherhood followed, with the movement blacklisted, hundreds of its supporters killed and thousands jailed or sentenced to death.
The courtsÂ handling of the cases against Morsi and his supporters, many of whom have been convicted after mass trials lasting just days, has drawn criticism from Western governments, human rights groups and the United Nations, which described the trials as “unprecedented” in recent history.
Last week, the Court of Cassation also overturned a death sentence handed down against Morsi on charges of taking part in prison breaks and violence against policemen during the 2011 uprising against Mubarak.
That decision enabled Morsi to stop wearing the red uniform reserved for death row prisoners.
Five co-defendants, including Brotherhood supreme guide Mohamed Badie, who also received death sentences, are to be retried too in that case.
“These decisions tell us that the initial verdicts were political,” said lawyer and human rights activist Gamal Eid.
From next Monday, the court is to start reviewing a second life sentence handed down against Morsi in a separate trial on charges of stealing documents relating to national security and handing them over to Qatar, a longstanding supporter of the Brotherhood.
Last month, it upheld a 20-year jail sentence passed against Morsi on charges of ordering the use of deadly force against protesters during his year in power, which has become the only final verdict against the former Islamist president.
Morsi is being held at the Borg el-Arab prison near the northern city of Alexandria.
A veteran activist and engineering professor, Morsi emerged as a compromise candidate for the Brotherhood to field in EgyptÂ s first democratic presidential election in 2012.
He narrowly won the vote but was soon accused of failing to represent all Egyptians and of trampling the ideals of the anti-Mubarak uprising.
His rule was marked by deep divisions in Egyptian society, a crippling economic crisis and often deadly opposition protests.
Morsi was removed by Sisi on July 3, 2013 after millions took to the streets demanding his resignation. Sisi became president a year later.
Morsi denounced a “coup” and his supporters insisted he was still the legitimate president.
Hundreds were killed in clashes that erupted when security forces dispersed two pro-Morsi protest camps in Cairo in August 2013.
The years following MorsiÂ s overthrow saw a surge in bombings and shootings targeting security forces, particularly in the north of the Sinai Peninsula, a stronghold of the Islamic State group.
The jihadists say the attacks are in retaliation for the crackdown on Islamists.