The attack happened at about 8:00 pm local time yesterday in the village of Kamuya in Borno State, near where Nigeria's most senior army officer Tukur Yusuf Buratai has a home.
The Islamist gunmen arrived on foot and by bicycle, witnesses said.
Hit-and-run attacks were once a trademark of the Islamic State group affiliate but have decreased in recent months in the face of a sustained Nigerian army counter-attack.
It also took the number of civilian casualties since President Muhammadu Buhari took office on May 29 to more than 1,500, according to an AFP tally.
Also Read
Since 2009, at least 17,000 have been killed.
Ibrahim Babagana, who lives in Kamuya, said he and other locals fled the attack to the town of Biu, some 30 kilometres away, as Boko Haram fighters set fire to the village.
He initially gave a death toll of nine but later told AFP: "This morning (Friday), some of us went back to the village.
"Seven others were shot dead. They have all been buried. The entire village has been razed."
Mustapha Karimbe, a member of a civilian militia involved in fighting Boko Haram, gave a similar account and said half-a-dozen people were injured.
"The six injured victims are receiving treatment at the General Hospital in Biu," he added.
Kamuya is the hometown of Buratai's mother and was previously attacked in a similar raid in July. Nearby Buratai village, 10 kilometres away, was also hit.
Residents of Kamuya had returned to cultivate their farms after the July attacks.
But the latest attack -- and a similar one in Bam-Buratai on November 28 that left at least four dead -- will add to fears about returnees' safety.
Last weekend, Boko Haram fighters torched almost an entire village near the Borno town of Chibok, from where more than 200 schoolgirls were kidnapped in April last year.