The courts also acquitted the two sons of ousted strongman Hosni Mubarak, whom he served under, Alaa and Gamal, but they still face other corruption trials.
Shafiq fled to the United Arab Emirates shortly after he narrowly lost a 2012 presidential election to now ousted Islamist Mohamed Morsi.
His acquittal underscored the sharp reversal of fortune for Mursi and his Muslim Brotherhood movement since his overthrow by the army in July after a single turbulent year in power.
Shafiq has since founded a political party, and now that he is free to return, intends to build on it ahead of parliamentary elections scheduled for mid-2014, a spokesman told AFP.
“He plans to focus on his political party, to take charge,” said spokesman Ahmed Sarhan.
Shafiq had been charged with corruption in connection with land sales involving Mubarak’s sons, while he was a senior aviation official in Mubarak’s government.
His supporters said the charges, brought under Mursi following the deeply divisive contest for Egypt’s first democratic presidential election, were blatantly political.
Mubarak’s sons still face separate corruption trials, including one with their father, who is also accused of involvement in the killings of protesters during the uprising that forced him from power in February 2011.
Mursi himself is now on trial for allegedly inciting the killing of opposition activists.
He is also to stand trial for allegedly colluding with Palestinian and Lebanese groups to conduct a “terrorist” campaign, prosecutors say.
The Muslim Brotherhood denounced the charges, saying the allegations were “risible.”
In a statement released from London and received in the early hours of Thursday, the Brotherhood rejected the charges as a “new episode of the military coup’s crimes against the Egyptian people.”
“The junta’s judges continue to fabricate risible allegations against the democratically elected president and a number of leaders of the Muslim Brotherhood,” it said.
Hamas, which governs the Gaza Strip, also dismissed the allegations against it as “fabrications and lies.”
The Brotherhood also reiterated calls for all nations to put pressure on Egypt to free Mursi a day after the public prosecutor ordered him and 35 other top Brotherhood leaders to stand trial on charges that could result in the death penalty.
The military-installed government plans parliamentary and presidential elections by autumn 2014, amid widespread speculation that armed forces chief Abdel Fattah al-Sisi will compete and win.
Sisi has not confirmed his candidacy but, if he stands, former military officers such as Shafiq are expected to stand aside.
Shafiq has previously said that he would consider standing in the election only if Sisi did not.
Sisi, now a deputy premier and defense minister in the government he installed, overthrew Mursi, who had named him defense minister, following days of mass protests demanding the Islamist’s resignation.
A police crackdown has killed more than 1,000 people, mostly Islamists, in street clashes and imprisoned thousands more after Mursi’s ouster, including the Brotherhood’s top leadership.
The Islamists continue near-daily protests demanding Mursi’s reinstatement.
(AFP, Reuters, Al-Akhbar)