African Slaves were originally brought because they were cheap, not their skin color until the late 1600s to early 1700's (depending what colony) in what is today the United States. As time changed their slavery became racial based in idea to what we know of slavery in the United States today, and would keep changing until eve of the Civil War (the concept of Race is an ever changing definition in history, and changed over its time in the United State as well).
Some West African Kingdoms became rich and powerful through selling slaves to Europeans and North Africa. These African Kingdoms would send ambassadors to European Powers and pay powerful lobbyist to protect their slave trade as European Powers outlawed slavery.
Remember the horrors that happened because human life was valued as cheap, because people were viewed as chattel to be sold as property. This was not that long ago in the USA, or many other places in the world, some countries only outlawing this as late as 1962. Slavery still exists in many parts of the world today underground as well (
https://www.cnn.com/specials/africa/libya-slave-auctions)