First, the use of the term African 'Nations' is somewhat incorrect. It would be more accurate to refer to African Kingdoms - states ruled by dynasties of monarchs.
While I'm not an expert on the subject of slavery within sub-Saharan Africa, whether before or after contact with Europeans, it's my understanding that slavery was a common institution in sub-Saharan Africa. However, the nature of the practice of slavery in sub-Saharan Africa was complex, varied, and differed in some respects with the use by Europeans of Africans as slaves. In any case, it does seem that a common source of slaves in sub-Saharan Africa before European contact was the enslavement of enemy captives taken in war (which was true of a great many civilizations / peoples throughout the world).
It's my understanding that the potential among West African rulers to obtain trade goods from Europeans was indeed a motive for selling slaves to merchants from Europe. But it wasn't limited to the accumulation of valuable goods. During the 18th century in particular, Europeans seeking to purchase slaves began to offer supplies of hand-me-down muskets and gunpowder for slaves. This gave the rulers of West African kingdoms access to new, more powerful military technology, giving their armies a significant advantage over those of neighboring kingdoms.
The trade of firearms for slaves created a vicious cycle in West Africa. Second-hand European muskets would give the army of a kingdom an edge in battle, bringing them victory and, with it, captives to be sold as slaves. The slaves that were sold - taken as captives in war - gave a kingdom even more muskets and gunpowder, which, in turn, enabled the kingdom in question to capture more enemy people that could be sold as slaves, and so on...
I can recommend two books that cover these issues and that have excellent bibliographies that will direct you to academic articles on the muskets for slaves cycle:
Smith, Robert S. Warfare and Diplomacy in Pre-Colonial West Africa. Madison, Wisconsin: University of Wisconsin Press, 1976.
Thornton, John K. Warfare in Atlantic Africa 1500-1800. Warfare and History Series. London: University College London, 1999.