There is a root in certain branches of Niger-Congo, roughly nam, meaning "animal; meat" which is ubiquitous in Bantu as nyama and similar words. It has been borrowed into a number of unrelated languages (including Hausa and Jamaican Creole), and also is metaphorically extended to mean "eat". The non-Bantu languages attesting this loan are mainly in the Plateau region of Nigeria. Another possible branch of borrowing would be via the word for yam, attributed to West African languages via a word meaning "eat", however I haven't found support from any reputable source (there are hundred of languages to check and I have only a few dictionaries on hand).
It is supposedly a name given by the Dinka to their neighbors the Azande. One Dinka root for "eat" is cam ("meat" is riŋ); niaan is "overcook", and nhiam is "proud", the point being that there is no support for the claim that the term actually came from Dinka, and insofar as Zande is in the same sub-phylum as Bantu and is in proximity with Bantu, it is more likely that this has nothing to do with Dinka, other than the claim that they promulgated the name. In the 1926 article "Observations on Some Aspects of Religion Among the Azande", Captain Philipps states that Sudanese and Egyptian Arabs adopted this terms for all Africans whom they considered to be cannibals, but again that claim lacks substantial support. See also "Cannibalism in the Bahar el Ghazl", Sudan notes and records (Spence, 1920). The editor of the volume asserts
The Arabs can hardly have adopted the the Dinkas, as it occurs under
the variants Gnem-Gnem, Jem-Jem in the medieval Arab geographers and
early maps and always to describe the people of the cannibal belt of
Africa to the south of the northern Moslems. The word is doubtless
onomatopoeic to describe the gnashing
It is not too much of a stretch to think that this was onomatopoetically-reinforced borrowing from Niger-Congo via Arabic when delivery to Turkish, but more historical detail on said Arab geographers would be necessary before reaching a firm negative or positive conclusion.