Alaa, 53, and Gamal Mubarak, 51 - were now free to leave their prison as they had served the maximum 18 month-pretrial detention period, their lawyer Farid el Deeb said.
This meant the duo should be released because they were not being tried in any other case.
Last week, the Cairo Criminal Court accepted the appeal of Mubarak and his sons in their 3-year and 4-year jail-terms for graft respectively and ordered their retrial.
Mubarak and his sons have been charged with acquiring around 126 million Egyptian pounds from the presidential palace budget and using the money for the construction and development of family-owned assets.
Also Read
They are also charged with forging official documents and willfully damaging public property.
This is the last remaining case keeping Mubarak behind bars as charges of conspiring in the killing of hundreds of protesters during the uprising that ended his nearly three decades-long rule in 2011 were dropped in November last year.
His sons were given four-year jail terms in the same graft case for which he got three years in prison.
In 2012, the former autocrat was sentenced to 25 years in jail but the verdict was successfully appealed in January, 2013 as the presiding judge ruled that there was not enough evidence presented by the prosecution.
Mubarak's retrial began in April, 2013.