The ministry said fifteen soldiers and two civilians were wounded during the attack heavily armed men in Gueskerou village, which is around 30 km (22 miles) northeast of Diffa town.
The defence ministry said that among the enemy there were 57 terrorists killed, a Toyota pick-up recovered along with a 60 mm mortar, two rocket propelled grenade launchers, five machine guns, 20 AK-47s and a lot of ammunition.
The report could not be independently confirmed.
Boko Haram has killed 15,000 people and displaced more than two million during a seven-year insurgency aimed at creating an Islamic state in Nigeria.
A regional force that includes troops from Niger has retaken much of its territory in the last two years.
In recent years its attacks have spilled into neighbouring Niger, Cameroon and Chad.