The military said the terrorists were killed on Thursday as troops fought off an assault on the headquarters of its 27th brigade in Yobe state.
Nigeria's military said it killed at least 50 terrorists during clashes this week at a base in the country's northeast.
Since 2009, the country has been battling the Boko Haram and Daesh-WAP terrorist organisations operating in the region.
The military said the terrorists were killed on Thursday as forces fought off a Daesh-WAP assault on the headquarters of its 27th brigade in the town of Buni Gari, as well as a nearby checkpoint in Yobe state.
"The assault, launched at approximately 0200 hours under the cover of darkness by a large number of terrorists from multiple axes, was met with devastating firepower, tactical brilliance and resolute determination by troops," the arm said in a Friday statement.
It added that "no fewer than 50 terrorists were neutralised" and a large cache of weapons and ammunition was recovered, though two soldiers were also killed.
Weapons seized
Photographs released by the military and seen by AFP showed bodies along with seized weapons and ammunition.
Terrorists have killed more than 40,000 people and displaced around two million in northeast Nigeria, according to the United Nations. The violence has spilled over into parts of neighbouring Niger, Cameroon and Chad in recent years.