The attack occurred late Thursday night in the Madagali area of Adamawa state near the Sambisa forest, which has long been a stronghold for the Nigeria-based Islamic extremist group.
“They stormed our village on motorbikes and immediately opened fire on the people observing the wake,” said a witness who insisted on anonymity, citing security concerns.
Police spokesman Othman Abubakar confirmed early reports that 18 people were killed and warned the toll could rise.
Lawmaker Adamu Kamale, who represents the region in the House of Representatives, said most of the dead were women and children.
“There was pandemonium during which many people scampered for their lives,” Kamale said.
Boko Haram pledged support for the Islamic State group last year. The group’s nearly seven-year-old insurgency has killed some 20,000 people, forced more than 2 million from their homes and spread into neighboring countries.