The UN Office for West Africa and the Sahel (UNOWAS) said in an emailed statement on Wednesday evening that the shooting happened Tuesday in the Hosere Jongbi area near Kontcha, northern Cameroon.
"An unknown armed group attacked the UN team and killed five persons and injured several others," UNOWAS said.
"The victims were one UN independent contractor, three Nigerian nationals and one Cameroonian national."
The UN special representative for West Africa and the Sahel, Mohamed Ibn Chambas, condemned the attack.
Islamist group Boko Haram, whose insurgency has devastated northeast Nigeria since 2009, is also active in the far north region of Cameroon.