The Daily Trust published photographs on its website of armed soldiers raiding its head office in the capital, Abuja. The paper also said the military had shut down its office in the northeastern city of Maiduguri after arresting a regional editor and a reporter.
The paper said the raids and arrests followed the publication of a story about the fight against Islamists. An uptick in attacks in recent months has made security a key campaign issue in the run up to the Feb. 16 presidential election in which Muhammadu Buhari will seek a second term.
A Nigerian army spokesman did not respond to text messages and telephone calls seeking comment.
"The Federal Government has directed the military to vacate the premises of @daily_trust and the order has been complied with," the president's spokesman, Garba Shehu, said on Twitter.
"Issues between the military and the newspaper as they affect the coverage of the war in the Northeast will be resolved through dialog," he added.
Atiku Abubakar, a businessman and former vice president who is the main opposition party's candidate, also posted a message on Twitter following the raids.
"Freedom of the press is the bedrock of our democracy and nothing should be done to compromise it," he said.
The Islamist militant group Boko Haram has killed around 30,000 people since 2009 in an insurgency aimed at creating an Islamic caliphate in northeast Nigeria that has spawned a humanitarian crisis.
It was pushed off most of the swathe of territory around the size of Belgium that it controlled in early 2015, but a faction that broke away in 2016 - Islamic State in West Africa (ISWA) - has in the last few months claimed responsibility for a series attacks on military bases and strategically located towns.
The group attacked Baga - a town that borders Niger, Chad and Cameroon - in December, forcing hundreds to seek safety in Maiduguri, some 200 km (125 miles) to the south.
Opponents of Buhari have criticized his security record, pointing to such battles and a notable attack on an army base in Metele, Borno state, in which about 100 soldiers were killed.