Reports on the death toll in Mailari, Borno state, differed. A local militia leader said six people had died but a survivor said up to 19 were killed.
The militants ransacked and looted the village for two hours before leaving, witnesses added.
The Boko Haram jihadist group has carried out numerous attacks in Borno state.
Militia leader Babakura Kolo told AFP news agency that the militants had arrived in trucks late on Saturday, firing guns and rocket-propelled grenades.
“In the confusion, the Boko Haram gunmen seized six men and slaughtered them,” Babakura Kolo said.
“The bodies of the six victims were found this morning (Sunday) when residents returned to the burned village.”
Villager Aisami Grema said that police stationed nearby had made no attempt to engage the fighters.
Another villager, Abatcha Umar, said he was not sure if the militants were members of Boko Haram or of the splinter group Islamic State in West Africa Province (Iswap).
He said militants had been seen around the village three days before the attack.
Boko Haram launched its insurgency in 2009 with the aim of establishing an Islamic caliphate in West Africa.
The conflict has reportedly left around 20,000 people dead and displaced at least two million.