According to the officials, the incident occurred in Monguno town in Borno state on Friday.
More than 100 vigilantes who helped the military in hunting for the insurgents were ambushed by the terrorists putting on military uniforms to disguise themselves.
Recently, Nigerian President Goodluck Jonathan declared a state of emergency in three northern states and the military was deployed massively to the region.
Later, the army announced that the leader of Boko Haram, Abubakar Shekau died as a result of injury sustained during their raid on the militant's hide-out.
The oil-rich African country is home to both Christians and Muslims, numbering 150 million.