He gave the order in a presidential broadcast on Sunday evening.
He said the no-movement order will be for an initial period of 14 days.
He said the restriction was to curb the community transmission of COVID-19 in the states where it is prevalent.
Lagos has the highest number of confirmed cases of the coronavirus in Nigeria followed by Abuja.
He said, “Based on the advice of the Federal Ministry of Health and the NCDC, I am directing the cessation of all movements in Lagos and the FCT for an initial period of 14 days with effect from 11pm on Monday, 30th March 2020. This restriction will also apply to Ogun State due to its close proximity to Lagos and the high traffic between the two States.
“All citizens in these areas are to stay in their homes. Travel to or from other states should be postponed. All businesses and offices within these locations should be fully closed during this period.
“The Governors of Lagos and Ogun States, as well as the Minister of the FCT, have been notified. Furthermore, heads of security and intelligence agencies have also been briefed.
“We will use this containment period to identify, trace and isolate all individuals that have come into contact with confirmed cases. We will ensure the treatment of confirmed cases while restricting further spread to other States.
“This order does not apply to hospitals and all related medical establishments as well as organizations in health care related manufacturing and distribution.
“Furthermore, commercial establishments such as; food processing, distribution and retail companies; petroleum distribution and retail entities, power generation, transmission and distribution companies; and private security companies are also exempted.
“Although these establishments are exempted, access will be restricted and monitored.
“Workers in telecommunication companies, broadcasters, print and electronic media staff who can prove they are unable to work from home are also exempted.”