According to the United Nations Office for West Africa, the attack occurred on Tuesday at around 1400 local time near the Cameroonian border town of Kontcha.
“The victims were one U.N. independent contractor, three Nigerian nationals and one Cameroonian national,” it added.
Mohamed Ibn Chambas, U.N. Special Representative for West Africa and the Sahel, condemned the attack.
While the attackers have not been identified, the area is within a region where fighters from Islamist militant group Boko Haram are active.
The insurgents have killed more than 15,000 people since 2009 and have recently stepped up suicide bombings.
The U.N. team was working on demarcating the more than 2,000 km (1,200 mile) land border which has been a source of friction between the neighbouring countries in the past.