The fighting also has caused some 260 aid workers to leave conflict-affected areas since November in what the U.N. called "the largest withdrawal of aid workers since the international humanitarian response scaled up in 2016."
The recent surge in attacks by Boko Haram extremists and the offshoot Islamic State West Africa Province has caused alarm in Nigeria and posed a major challenge for President Muhammadu Buhari as he seeks a second term in next month's election.
Nigeria's government recently confirmed the extremists had begun using drones, calling it a "critical factor" in a rise in attacks against military bases. In November alone it acknowledged dozens of soldier deaths.
The U.N. statement said most of the tens of thousands of displaced people have come from Baga near the border with Chad and ended up in Maiduguri, the capital of Borno state and birthplace of Boko Haram's decade-old insurgency.
Extremists late last month seized Baga and a key base for a multinational force fighting Boko Haram, sparking days of fighting as Nigerian forces tried to regain control. The base's weapons, ammunition and other equipment are a key target for the extremists, who also overran it in 2015.
Last week Nigeria's military said a Nigerian Air Force helicopter crashed in combat, killing five crew members, as the fighting for Baga continued. The Boko Haram insurgency has been blamed for some 20,000 deaths and thousands of abductions. The unrest and displacement of millions of hungry people have turned northeastern Nigeria into one of the world's worst humanitarian crises.
Follow Africa news at https://twitter.com/AP_Africa