This is in what was likely the latest attack by the militant Islamist group Boko Haram.
Boko Haram, which aims to carve out a hardline Islamist state in Nigeria's restive north, has stepped up its ferocious attacks since abducting more than 200 girls in April from a school in the village of Chibok in Borno state.
The attack on the remote village of Daku, an area bordering Chibok, started on Sunday, said the official who asked not to be named. The gunmen arrived in a military column and brandished AK-47s, which was similar to previous Boko Haram attacks.
"My brother who travelled to the village was caught up in the incident but was lucky to escape," Manaseh Adamu, a resident of Borno state's capital of Maiduguri, told Reuters. "He told me some Boko Haram members started shooting into the market."
Boko Haram has killed thousands since 2009 in its push to carve out an Islamist state in Nigeria's restive north. Northeast Nigeria is now wracked by almost daily attacks.
Separately, at least four people were killed and houses torched in unrelated ethnic clashes between rival groups in Nigeria's eastern Taraba state, other security officials said. These clashes did not appear to be the work of Boko Haram.
Taraba state is part of Nigeria's "Middle Belt" where its largely Christian south and mostly Muslim north meet, making it a flashpoint for violence. Land disputes often break out between semi-nomadic cattle-raising communities, which tend to be Muslim, and settled farming people who are often Christian.
Youths burned down two kiosks in a Muslim community in the small commercial town of Wukari early on Sunday, sparking the violence, Taraba state police spokesman Joseph Kwaji said.
Gunshots were later heard and numerous houses torched, Kwaji said, adding that four people were confirmed killed.
Nigerian media reported that more than 25 people were feared dead after the clash, although Reuters was unable to independently verify that number. Last year similar clashes in Wukari killed at least 39 people.