The 88-year-old left a Cairo military hospital for his home in the Heliopolis neighbourhood.
Earlier this month, an appeals court cleared him of being involved in the killing of protesters during the 2011 uprising that ended his rule over the country.
Around 850 people are thought to have died over 18 days in 2011 as demonstrators clashed with police during protests.
Mr Mubarak was the first leader to face trial after the Arab Spring uprisings, which forced him to resign after 30 years in charge.
In 2012 he was sentenced to life in prison, but the main charges were dismissed in a retrial two years later.
In January 2016 an appeals court upheld a three-year prison sentence for the former leader and his two sons on corruption charges, but the sentence took into account time served and both his sons were freed.
Mr Mubarak is, however, the focus of a new corruption investigation after allegations he received gifts from the state owned Al-Ahram newspaper.
As the ex-president was released, an explosion in the Maadi suburb of Cairo killed one person and injured three others, but the two events are not thought to be related.