Despite the celebration of end of Ramadan fasting, two suicide bombers attacked Damboa town in Borno State, killing at least 31 people.
The attack came only hours after Tukur Buratai, Chief of Army Staff urged displaced residents to return home because it was safe.
The explosions were followed up by rockets fired from outside the town. Boko Haram militants are suspected.
“Let me use this opportunity to call on the good people of northern Borno… to return to their communities which have long been liberated by our gallant troops,” he said at an inauguration ceremony for gunboats earlier on Saturday.
A four-month military operation started on 1 May to expel Boko Haram insurgents from northern Borno and the Lake Chad region.
No group has said it carried out Saturday evening’s attacks but a militia leader speaking to AFP, Babakura Kolo, said they bore the hallmark of Boko Haram, a jihadist group wthat wants to establish a caliphate in northern Nigeria.
The attacks were aimed at people who had been celebrating the Eid al-Fitr holiday in the Shuwari and Abachari districts of the town.
The rocket attacks appear to have caused most of the casualties, a local official said.
The UN says 1.7 million people have been forced from their homes due to the Boko Haram conflict, which is now in its ninth year.
Boko Haram uses suicide bombers, often young girls, to target civilians and soldiers.
In one of the most recent attacks, bombers killed dozens of people in and around a mosque in the town of Mubi.
Despite the ongoing threat of suicide bombings, the security situation in north-east Nigeria has improved, says BBC Africa’s Will Ross.
But there will be some scepticism about calls to return home, BBC correspondent adds. Previous promises that it is safe because the jihadists have been defeated have proved to be premature.