The latest atrocity is believed to be in retaliation to an incident when villagers fought off a Boko Haram attack two weeks ago.
The attack on civilians is the deadliest in the region so far this year.
Eleven other people were wounded during the midday attack in Budu near Maiduguri on Saturday, according to Muhammad Bulama, council chairman of the Nganzai local government area.
Bunu Bukar, secretary of self-defence group Borno Hunters Association, said the extremists were on motorbikes and opened fire on villagers.
He added that his colleagues had recovered nearly two dozen bodies.
Mr Bulama said the atrocity was in retaliation to an incident when villagers fought off a Boko Haram attack in the area two weeks ago.
Last week Nigerians marked the 10th anniversary of the Boko Haram insurgency which has killed tens of thousands of people, displaced millions and created one of the world's biggest humanitarian crises.
The extremists have carried out mass abductions of schoolgirls and deployed young women and men in suicide vests to attack markets, mosques and other highly populated areas.
Their aim is to impose strict Islamic rule in the region.
Boko Haram have broadened their attacks and carried out atrocities in neighbouring Chad, Niger and Cameroon.
Reporting by Sky News
Pray: For the military and intelligence services to root out and bring these militants to justice.
Pray: For the victims and their families – for healing and comfort in their grief.
Pray: For an end to this ongoing campaign by Boko Haram.