The legal paperwork, in line with a ruling of an international tribunal, was signed by Nigeria's Justice Minister Michael Aondoakaa and by his Cameroonian counterpart Maurice Kanto.
"(Cameroonian) President Paul Biya ... looks forward to new, reliable and mutually beneficial relationship between Cameroon and Nigeria," Kanto said just before the handover, which took place in the Nigerian border town of Calabar.
UN Secretary General Ban Ki-Moon, in a message read out at the ceremony said: "It is a day of triumph for the rule of law, which lies at the very core of the values of the UN".
The UN Secretary General's Special Representative for West Africa, Said Djinnit, said the handover "should serve as a model in the many places in Africa where borders are under dispute".
"As painful as it is, we have a responsibility to keep our commitment to the international community to advance international peace and cooperation ... and advance the cause of African brotherhood and good neighbourliness," Nigeria's Aondoakaa declared.
The transfer, staggered over two years, has been dogged by political disagreements, a last-minute lawsuit and occasional gun battles.