Gunmen believed to be members of the Malian Islamists attacked the base in Timbuktu on Friday morning.
The base, hitherto used as a hotel and called Hotel Palmeraie is occupied exclusively by Nigerian policemen. It is located near the entrance to the ancient city.
There were doubts whether all the Nigerians were inside at the time of the attack.
Security sources said a Malian army checkpoint in the city also came under fire.
The attackers drove up to the entrance of the U.N. base in the former Hotel Palmeraie at around 6:30 a.m. (0630 GMT) and then detonated their vehicle, said Olivier Salgado, spokesman for the U.N. peacekeeping mission in Mali, MINUSMA.
“An unknown number of assailants have withdrawn inside the camp. An operation is currently under way with Malian and MINUSMA forces,” he said, adding that an injured police officer had been evacuated.
A military source in Timbuktu could not say whether there were any U.N. personnel inside the site with the attackers. Salgado said it had been empty at the time of the attack, barring a few guards.
Simultaneously, a Malian army checkpoint in the Kabara neighbourhood near the airport was attacked by gunmen. It was not immediately clear if there were any casualties.
Islamist militants, who briefly held the city of Timbuktu in 2012 until French forces drove them out, have stepped up attacks in Mali in recent months as part of a growing regional insurgency.
Last month, al Qaeda fighters seized a Swiss missionary living there and set conditions for her release.