Reports from Cairo suggest he may be freed from prison on Thursday, but the prosecution may still appeal.
The 85-year-old is also being retried on charges of complicity in the killing of protesters during the uprising that forced him from power in 2011.
He was sentenced to life in jail last year, but a retrial was later ordered after his appeal was upheld.
That retrial opened in May but Mr Mubarak has now served the maximum amount of pre-trial detention permitted in the case.
State of emergency
On Wednesday, the court in the capital ordered the release of Mr Mubarak, said his lawyer and judicial sources.
Asked when Mr Mubarak could actually leave the prison, his defence lawyer Fareed El-Deeb told Reuters: “Maybe tomorrow.”
The ruling came during a hearing on charges that the former president had accepted gifts from state-run publisher al-Ahram.
It is unclear whether he could leave the prison immediately, as in the past prosecutors have brought new charges to keep the ailing ex-leader in detention.
Analysts say Mr Mubarak’s release – if it happens – would be seen by many as a sign the military is rolling back the changes that flowed from the 2011 uprising.
Egypt is under a state of emergency amid the bloodshed which has accompanied the interim government’s crackdown on Islamists opposed to the army’s ousting of Islamist President Mohammed Morsi on 3 July.