Actually no. Slavery has existed for as long as there are humans, Africa enslaved people from other regions (like Tahiti) and then sold them to Europeans.
Racism entered the world through Eugenics, which tried to claim that people from Africa are undeveloped by their genetics. Eugenics was also used by the Nazis.