There seems to be widespread agreement that the first Djembes appeared in the area that today is the border area between Guinea and Mali. How long ago? Well there's no exact account; I've read that it could be as early as 500 AD, but the 11th or 12th century AD is more commonly mentioned.
The creation of the first Djembes is associated with the blacksmith caste of the Mandinka (or Malinke) people whose westward migration eventually spread the Djembe to what are now the coastal countries of West Africa.
A common myth about the Djembe is that it was used as a signalling drum to send messages from one villages to another. However, there is no evidence that that is true at all. I guess it's a narrative that us Westerners like to hang on to for some reason.
I'm sometimes asked about what the word actually Djembe actually means. No straightforward answer here either, I'm afraid. It probably depends on which West African language is being referenced. So, in one language the two syllables mean "unity" and "harmony." In another, they reference the name of a type of wood commonly used to make the drum and the word for goat. Another interpretation is that the word Djembe means "everyone gather in peace." It all sounds good to me!
Two (of many) sites for more about the origin of the Djembe: