The primary motivation for slavery in Africa was for European societies to make a profit. As the continent was moving towards mass production of goods, the labor to produce materials needed for manufacturing was immense. The British textile industry is a strong example to cite. To manufacture clothing in a factory, workers were needed to complete a finished product. The factory workers would not be the only laborers needed, however, as cotton needed to be cultivated to make garments in the first place. To make the production of clothing more profitable, the British used slaves to gather cotton.
Aside from the wealth generated by eliminating the cost of one of the factors of production, other factors were in play. The colonization of the Americas opened a vast opportunity for agricultural production of cash crops to create manufactured goods. The problem was that there was limited supply of labor to turn this opportunity into reality. Attempts were made to enslave native populations, but their knowledge of the land and susceptibility to disease made this a failure. The solution to this labor shortage in the new colonies was to import slaves from Africa to work in cash crop industries.
Another reason that the chosen source of slaves was Africa is because of the availability of millions of slaves in close proximity to the Atlantic coast. Europeans could anchor at any number of slave ports along the coast and secure slaves with relative ease. A number of African kingdoms were complicit in this trade and grew quite powerful as a result.
It is tempting to cite racism as a cause of selecting Africa as a source of slaves. It is more likely, however, that racism was a result of the Atlantic Slave Trade and not a cause.