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.