The file picture taken on June 18, 2016 shows Egyptian ousted president Mohamed Morsi in the defendants' cage during his trial in Cairo, Egypt.
The court also upheld death sentences for documentary producer Ahmed Ali Abdo, EgyptAir cabin crew member Mohamed Adel Kilani and university teaching assistant Ahmed Ismail Thabet, as well as a life term and 15 years for two others, the official said.
The Egyptian Court of Cassation issued a final ruling on Saturday, reducing Morsi's sentences in the espionage case from a combined total of 40 years to 25.
The documents allegedly include information on general and military intelligence, armed forces and state policy secrets which harm the national security. The prosecution also accused the defendants of working for the "terrorist branded Muslim Brotherhood" organisation, Xinhua news agency reported.
The court also ordered to adjourn the verdict on other 13 defendants in that case to 25 November.
This is the second time that Morsi got a confirmed sentence.
Morsi is already serving a 20-year sentence for killing protesters during demonstrations in 2012.
Hundreds of the group received death and life sentences, mostly over violence, murder and spying charges.
Morsi was immediately arrested after the coup and Sisi has been the president of the country since 2013.
In May, 2015, Morsi and 106 Muslim Brotherhood supporters received death penalties over a mass jail break following the 2011 uprising.
But the death sentence verdict was overturned and now Morsi is facing retrial.
In 2014, Egypt charged Morsi and nine others with endangering national security by leaking state secrets and sensitive documents to Qatar.