The series of attacks by armed bandits took place over the past 48 hours with 18 people killed in villages in Kaduna and Katsina states and several people injured. The assailants burned houses, displacing the villagers.
Hundreds of people have been killed in northern Nigeria by criminal gangs who carried out robberies and kidnappings.
These attacks have added to security challenges in Nigeria, which is struggling to contain Islamist insurgencies in the northeast and community violence over grazing rights in central states.
The latest attack comes less than a month after President Muhammadu Buhari replaced his former military leaders amid violence, with the armed forces fighting to retake other northeastern cities invaded by insurgents.
Last week, unidentified gunmen killed a student in an attack on a boarding school in northeastern Nigeria and abducted 42 people, including 27 students.