Excuse me if this question has been asked, but I can’t seem to find a consistent answer to this.
Slavery has existed in many societies throughout history. However, we must be careful not to think of slavery as a single cultural practice that is the exact same in every society. Pre-contact West African societies did practice slavery. The taking of captives during times of war was a common practice. However, there are a few differences between this slavery and the chattel slavery of the West (Note: this is not a moral argument, but there are some important distinctions to make between pre-contact enslavement and the Trans-Atlantic Slave Trade)
Chattel slavery refers to the commodification of human beings. People become the personal property of their owner and can be bought and sold at will. Their lives and freedom are forfeit. This is commonly associated with slavery in the southern United States, the Caribbean, Brazil, etc. West African polities had centuries of contact and trade with North Africa, where some slaves were exchanged for horses and other goods. However, this is not chattel slavery, at least not on the same scale.
When the Portuguese arrived in West Africa in the mid-15th century, followed shortly thereafter by the British and Dutch, their primary trading interests were in gold, sugar, pepper, and slaves. West Africans were interested in acquiring European goods, especially firearms. Europeans began to establish coastal forts on the Ivory Coast, Gold Coast, and in Angola. Around 1650, with the rise of the plantation complex in the Caribbean and Brazil and the increased demand for labor that it brought, slaves became the main commodity of European interest.
As previously mentioned, the main way West African polities took slaves was through war. Now with European firearms, a cycle of violence began. If one group begins raiding for slaves, then groups around them need firearms to defend themselves. Those firearms have to be paid for, and since Europeans were interested in slaves, those debts were often paid in slaves. That leads more groups to become slave raiders, and the process continues. This shows one deviation from pre-contact slavery and that is scale. Places like Jamaica and South Carolina were slave societies. Slaves constituted the main labor force, the bulk of the population, and were the main drivers of the economy in these areas. Contrast this with, say, Massachusetts. This is a society with slaves, but slaves were not a majority of the population or the major economic drivers.
Another key difference was that slavery was not always permanent in pre-contact West Africa. Captives may be exchanged. Slavery was sometimes used as punishment for crimes, and so was not always permanent. In West African societies that practiced Islam, technically anyone who converted to Islam could not be held as a slave by another Muslim Muslims were not supposed to become slaves. Moreover, the children of slaves were not born into slavery as they were in the West. Slaves in West Africa were often tied into kinship structures and were typically subjects of the royal household.
In the West, slavery was almost always permanent. Yes, some people attained freedom or successfully escaped. But the majority did not. And not only was it permanent for most people, it was also permanent for their children and grand-children, and so on. Another important point is that the horrors of the Trans-Atlantic Slave Trade left lasting impacts on the people who experienced them. This included, but was not limited to, a loss of culture, a loss of identity, disease, death, and perhaps even a sort of PTSD from the crossing itself.
So yes, slavery existed in West Africa well before the 1450s. But not in the same way. And the European demand for slaves increased the scale of slave-taking and trading significantly. There was also likely not a racial component to slavery in West Africa, but I don’t know enough about say, Kongo concepts of race, to say with certainty whether or not they thought of people who were not Kongo as other races.
Sources: David Northrup, “Africans, Early European Contacts, and the Emergent Diaspora”
Stephanie E. Smallwood, Saltwater Slavery (for the bit about the effects of the TAST)