A security source said on condition of anonymity due to restrictions on speaking to the media that the terrorists were killed during clashes that lasted more than 13 hours in the town of Dikwa in Borno state, Anadolu news agency reported.
Several other members of the terrorist group were wounded yet managed to escape.
Vehicles belonging to the terrorists and a significant amount of ammunition was also destroyed, said the security source.
Boko Haram launched a bloody insurgency in 2009 in Northeastern Nigeria but later spread its atrocities to neighboring Niger, Chad and Cameroon, prompting a military response.
More than 30,000 people have been killed and nearly 3 million displaced in a decade of Boko Haram's terrorist activities in Nigeria, according to the UN Office for the Coordination of Humanitarian Affairs.
Violence committed by Boko Haram has affected some 26 million people in the Lake Chad region and displaced 2.6 million others, according to the UN Refugee Agency.