President Mahamadou Issoufou cut short a trip to Egypt to return home following the "tragedy" that took place at the base in Inates, near the border with Mali, the presidency said on Twitter.
Tuesday's attack in Inates in the western Tillaberi region was the deadliest on Niger's military since the country's militant violence began in 2015. The military has not released a death toll, but an adviser confirmed the provisional toll.
Militant groups are active across the region and Niger is a member of the G5 Sahel group, along with Burkina Faso, Mali, Mauritania and Chad - aimed at tackling the insurgency.
Earlier, the country's defence minister said that three soldiers and 14 attackers were killed in an assault on a military post on Monday.
Islamic extremists have long carried out attacks across the vast desert region, abducting foreigners and targeting spots popular with expatriates.
He added that another 12 soldiers were wounded and an unspecified number of others were missing, while a "significant number" of militants were also killed.
"We strongly condemn this heinous terrorist attack".
They agreed to postpone the summit initially scheduled on December 16 in the French southern town of Pau with the participation of the heads of state of Mali, Burkina Faso, Chad, Niger and Mauritania.
Niger forces have been fighting against Boko Haram militants as well as jihadists linked to the Daesh* group.
Some analysts have suggested that the deadly ambushes on army outposts are also aimed not only at stealing weapons but also at expanding the area of land under jihadists' control.