That has sparked numerous protests, including demands that Buhari should resign, as well as calls for more transparency about the president's condition.
"I feel I could go home, but the doctors are in charge," Buhari said, according to Saturday's statement, adding that there has been a "tremendous improvement" in his health.
Photos released by the presidency show Buhari standing outdoors, grinning and wearing sunglasses while holding a large "Get well soon" card, with a handful of officials around him in a leafy, residential area.
The 74-year-old president had already been in London from January to March for sick leave before returning to Britain in May for further treatment.
Both times, the president appointed his deputy, Yemi Osinbajo, to act in his stead.
Buhari's lengthy illness has sparked speculation about his ability to seek a second term in 2019. Politicians and diplomats have started privately discussing potential candidates should the current president not run.
If Buhari does not stand, it could also lead to greater ethnic and religious tensions in Nigeria, long riven by divisions between the largely Muslim north and the mostly Christian south.
Members of both the Muslim north and Christian south feel that a representative from either side should hold the presidency for the maximum two terms, eight years, before the opposite faction's candidate can then lead the nation.
Yet Buhari's appointment of Osinbajo, a southern Christian, as acting president did help allay fears of the intense political infighting of 2010 after then-president Umaru Yar'Adua fell ill and failed to nominate someone to run the country.
It was only when Yar'Adua, a northern Muslim, died in May that year that his vice president Goodluck Jonathan became Nigeria's leader, resolving the constitutional crisis.
When Jonathan successfully won the presidential election in 2011, one that many viewed as a vote that should have given the Muslim north its second term in the presidency, hundreds died in riots protesting against that victory.