Residents fearing another abduction fled the isolated village of Malari and reported the incident on Saturday after arriving in the Borno state capital of Maiduguri.
Boko Haram has been seizing young men in recent months to use as foot soldiers in its bid to form an Islamic state in northern Nigeria, residents said.
Scores of Boko Haram militants are reported to have stormed the village at around 8:00 p.m. local time (1900 GMT) on New Year's Eve, before taking the missing males into the Sambisa forest, near to the town of Gwoza, which the militants declared as part of their caliphate last June.
"They came in pick-up trucks armed with guns and gathered all the men in the village outside the home of the village chief where they preached to us before singling out 40 of our boys and taking them away," one resident, Bulama Muhammad, told AFP news agency.
On Tuesday, suspected Boko Haram gunmen also launched a deadly raid on the village of Kautikari. According to witnesses, the militants torched several buildings and killed as many as 15 people.
Boko Haram is also currently holding around 200 schoolgirls in captivity. The group abducted the young girls from their school, also in Borno state, last April.
The kidnapping sparked international outrage with prominent political figures and celebrities also supporting the #BringBackOurGirls trend on micro-blogging website Twitter.
Parents of the missing girls have now said that they are turning to the United Nations for help after losing faith in the Nigerian government. Global assistance from countries including the US, China, France and the UK has also failed to secure the girls' release.
Boko Haram's five-year uprising in Nigeria has claimed at least 13,000 lives, more than 2,000 of which were lost in the last year alone.
ksb/cb (AFP, Reuters)