More than 100 armed men on motorbikes and vehicles used improvised explosive devices and suicide bombs to ambush the military unit as it was making its way back from an operation in the insurgency-hit Tillaberi region.
The attack took place between the communes of Teguey and Bankilare, the ministry said in a statement released late on Thursday.
Around 30 attackers were killed, the ministry added.
Niger is one of several West African nations battling an Islamist insurgency that has spread outwards from Mali over the past 12 years, killing thousands and uprooting millions of people.
Frustrations over authorities' failure to protect civilians has spurred military coups in Mali, Burkina Faso, and Niger since 2020.
The juntas that seized power have cut ties with Western allies assisting local military efforts. They have kicked out French and other European forces and turned to Russia for assistance.
Niger's junta last week revoked a military accord that allows military personnel and civilian staff from the U.S. Department of Defense on its soil.