The Enlightenment was a period in which concepts such as individual rights, individual liberty, and equality began to gain popularity. Yet it is precisely in this same period that the slaves trade is at its most productive.
(This answer elaborates a bit on R. Barzell's answer.)
Charles Mills takes up this question in his book The Racial Contract. The title of Mills' book refers to a kind of inversion of classical social contract theory. Classical social contract theory uses a hypothetical, general social contract (involving "everyone," in some sense) to characterize a just society. Mills' inversion emphasizes actual agreements among small groups of people (namely, powerful white men in Europe and, later, the US) to treat certain other groups of people (namely, indigenous peoples and African or African-American slaves) as inferiors. For example, at the infamous Berlin Conference in 1884-5, a group of European diplomats gathered together and established the "rules" for the colonization of Africa.
Mills emphasizes that the idea of a biological hierarchy of races developed at the same time as Enlightenment and nineteenth-century ideas of democracy and equality. Indeed, white/European supremacy was often defended by the same individuals who argued for democracy and equality. For one example, Immanuel Kant — one of the most important and influential Enlightenment philosophers — was also one of the first people to articulate biologically-based racism. For another, early in On Liberty, John Stuart Mill writes that
It is, perhaps, hardly necessary to say that this doctrine is meant to apply only to human beings in the maturity of their faculties. We are not speaking of children, or of young persons below the age which the law may fix as that of manhood or womanhood. Those who are still in a state to require being taken care of by others, must be protected against their own actions as well as against external injury. For the same reason, we may leave out of consideration those backward states of society in which the race itself may be considered as in its nonage.
Note that this means that we can indeed blame philosophy for promoting white supremacy and biologicaly-based racism.
To reconcile this apparent contradiction, Mills develops the provocative notion of Herrenvolk democracy. "Herrenvolk" is a German term, associated with Nazism; it's usually translated into English as "master race." On Mills' view, most European and American political philosophers since the Enlightenment have implicitly assumed that, when we're talking about democracy or justice or equality, we're only talking about white people. White supremacy is silently assumed as given, fixed, or the background condition for society.
Finally, let me also recommend this essay by geneticist Richard Lewontin. Lewontin argues that notions of biologically-based differences — between sexes and between races — have an important ideological function in liberal political philosophy:
The bourgeois revolution succeeded because it was only breaking down artificial barriers, but the remaining inequalities cannot be removed by a further revolution because what is left is the residue of biological differences that are ineradicable.
They reserved these rights for humans and called those they wished to enslave "subhuman". Humans do this all the time; they manage to maintain contradictory positions by creating distinctions specifically to allow these sorts of loopholes.
We can't blame philosophy for this, but philosophy does have a long tradition of trying to define humans, and has relied on things like "the rational principle" in the past. This makes it easier to deny human status to certain groups, since they use non-biological criteria to define humanity.