The army also took 20 prisoners, Colonel Moustapha Ledru said on state radio, and destroyed an armoured vehicle, 26 motorbikes, and two caches of food and fuel held by the Islamists.
Ledru did not say whether the Chadian army, which has large numbers of troops in Niger, had taken part in the operation. Nor did he specify whether it had taken place in Niger or neighbouring Nigeria.
The armies of Nigeria, Chad, Niger and Cameroon have been fighting a joint campaign against Boko Haram for several months, pushing militants out of captured towns and villages.
The attack - which took place in Deffa province near Nigeria, parts of whose northeast are under Boko Haram control - was the deadliest in Niger by the jihadist group since a raid in April killed 74 people.
Also Read
Niger's interior minister had announced the air and land operations as the country's security forces sought to "capture and neutralise" the attackers.
Boko Haram, which has been fighting to establish a hardline Islamic state in northeast Nigeria since 2009, has intensified its campaign of violence in the last month.
The US condemned "in the strongest terms" the latest attacks, according to a statement by the State Department.
And a double suicide attack blamed on the jihadists caused carnage in Chad's capital N'Djamena earlier this month, killing 33 people and wounding more than 100 others.