They came in two trucks and attacked the farmers with machetes outside Kalle, a remote village 17 kilometres outside the state capital Maiduguri, the birthplace of the Boko Haram movement.
“They used machetes to kill their victims who were working on their farms,” militia leader Babakura Kolo said. “So far, we have recovered 12 dead bodies from the fields and nearby bush.”
Three people were injured in the raids.
The militants had guns but did not use them so as not to attract the attention of troops in nearby Molai village, said another militia leader Ibrahim Liman.
“When the farmers saw them pulling over close to their crop fields they all ran in different directions but the terrorists pursued them,” Liman said.
It was not clear which of the two Boko Haram factions was behind the attack.
The jihadist faction loyal to Abubakar Shekau is notorious for deadly attacks on civilian targets.
The IS-affiliated faction Islamic State West Africa Province (ISWAP) focus on the military and high profile targets including Western interests, although they have recently been involved in attacks on civilians.
Boko Haram has stepped up attacks on farmers and loggers in recent years, accusing them of passing information on the group to the military.