The medically equipped helicopter landed at the jail as dozens of his supporters rallied outside, waiting for him to be released after more than two years in detention.
He was then flown to the hospital in a Cairo suburb where he will be held under house arrest.
The release threatens to stoke the unrest as the Arab nation is already gripped by a crisis over a military coup that ousted Mr Mubarak's Islamist successor Mohammed Mursi.
Prime Minister Hazem el-Beblawi has ordered Mr Mubarak be put under house arrest as part of the emergency measures imposed this month after a wave of violence sparked by Mr Mursi's ousting.
The decision appeared designed to ease some of the criticism over Mr Mubarak being freed from prison and ensure he appears in court next week for a separate trial.
Mr Mubarak still faces retrial on charges of complicity in the killing of hundreds of protesters in the 2011 uprising, with his trial due to resume next week.
Since Mr Mursi was removed by the military last month, about 900 people, including some 100 soldiers and police, have been killed across Egypt
In the latest violence yesterday, gunmen in a car killed an army major and a soldier on a patrol near the Suez Canal city of Ismailia. Two soldiers were wounded.