The men attacked the village of Faduma Koloram, in Gubio local government area of Borno state, starting about noon.
They arrived in vehicles and on motorcycles, shooting with AK-47s, razing the village, and stealing 1 200 cattle and camels.
A resident, a Civilian Joint Task Force (CJTF) member, and a soldier each confirmed the same account.
They said the men attacked because they suspected residents of sharing information on Boko Haram’s movements with security authorities.
A military spokesperson could not be reached for comment.
Boko Haram and its offshoot, Islamic State West Africa Province (ISWAP), have killed thousands and displaced millions in northeastern Nigeria.