"An estimated 50,000 people or so fled," UN refugee agency (UNHCR) spokesman Adrian Edwards told reporters in Geneva.
The attacks beginning Friday against a military post in Bosso in Niger's troubled Diffa region killed 26 soldiers, including two from neighbouring Nigeria.
A total 55 insurgents from the Nigeria-based Islamist group were killed and "many" injured, according to authorities.
Edwards said most of those fleeing the violence were walking westwards to Toumour, some 30 kilometres west of Bosso.
Also Read
A local journalist working with Radio Amfani told AFP that people began leaving the town at dawn Saturday after the gunmen initially withdrew.
"We trekked to Toumour where most of us are now sheltering with no food," he said.
In Bosso, he said, the Islamist fighters torched "the military barracks, police facilities and local administration office before looting shops and carting away food supplies."
Edwards said some of the displaced had moved on from Toumour and were heading to the town of Diffa, around 140 kilometres west of Bosso, and northwards towards Kabel awa, where a camp for the internally displaced is at near capacity with some 10,000 people."
The latest attack was among the deadliest by the jihad ist group in Niger since it began launching raids in the country in February 2015 from its stronghold in neighbouring Nigeria.
At least 240,000 people have been displaced in the Diffa region since then.
UNHCR, which has not had a presence in Bosso since the Boko Haram raids began nearly a year and a half ago, said it was working with the authorities and local partners to coordinate the response to the mass displacement.
Boko Haram's seven-year insurgency has devastated infrastructure in Nigeria's impoverished northeast and forced around 2.1 million people in the country to flee their homes, according to UNHCR.
The unrest has left at least 20,000 people dead in Nigeria and made more than 2.6 million homeless.