The 24-hour curfew was implemented in neighborhoods considered to be Boko Haram strongholds in the northeastern city, in a region that has been a hotbed of the Boko Haram guerrilla movement. The military said in a written statement it had the rebels on the run after attacks on various camps.
Witnesses told the BBC troops were stopping trucks from entering the city, the capital of Borno state.
The curfew was imposed a day after U.S. Secretary of State John Kerry urged the Nigerian government to show restraint in the current offensive to safeguard civilians. The BBC said more than 2,000 people had been killed in attacks chalked up to the Boko Haram since 2010.
The New York Times said human rights activists and observers were concerned the government offensive would result in civilian casualties and abuse, and would fail to crush the Boko Haram, who don't stay in one place for very long.
"The insurgents being essentially mobile and nomadic in their activities, will resurface," said Kole Shettima, the chairman of the Center for Democracy and Development in Abuja. "They may even attempt to attack us in different parts of the country."