In charge of the translation of the English encyclopedia of Chambers, he persuaded the bookseller who employed him to create a new work: this was the origin of the “Encyclopédie”. With other men of letters interested in this project, Diderot associated with the mathematician d'Alembert, who shared the management of the company and wrote the “Discours préliminaire”. The “Encyclopédie”, whose first volume appeared in 1751, with great success, was suspended in 1752 and 1759. D'Alembert, discouraged by the persecutions, gave up, but in the end, Diderot succeeded, through a thousand obstacles created by the clergy and the civil authority, in carrying out this great undertaking between 1751 and 1772 in 28 volumes.
He intervened in the debate on slavery in “Histoire des deux Indes” by currying the arguments of the defenders who claimed that their slaves were "happier in America than they were in Africa" by retorting:
“Why do these slaves keep yearning after their homeland? Why do they regain their freedom as soon as they can? Why do they prefer deserts and the society of ferocious beasts to a state that seems so sweet to you? Why does despair lead them to discard or to poison you? Why do their wives have so often aborted, so that their children do not share their sad destiny? When you tell us about the happiness of your slaves, you lie to yourself and deceive us. It is the height of extravagance to want to transform such a strange barbarity into an act of humanity.”
Published in 1770, with no author's name, an expanded in several editions until 1780, the “Histoire des deux Indes” is a considerable work of more than 10 volumes devoted to the colonial expansion of Europe in the 18th century. Attributed to the Abbé Raynal, it is in fact a collective work. Diderot collaborated in this, and probably wrote the pages devoted to slavery in which he denounced:
“We have reduced them, not to the condition of slaves, but to beasts of burden; and we are reasonable! And we are Christians! ... This purchase of Negroes to reduce them to slavery is a trade that violates religion, morality, natural laws and all the rights of human nature.... One may say that these colonies would soon be ruined if the slavery of the Negroes was abolished. But when would that be, must we conclude from this that the human race must be horribly harmed, to enrich us or to provide our luxury? ... Can it be legitimate to deprive the human race of its most sacred rights, only to satisfy avarice, vanity, or particular passions? No, be the European colonies rather destroyed than make so many unfortunate people"
The book was in its time a real best-seller and the particularly incisive anti-slavery argument served as a basis for the argument of the future Society of the Friends of the Blacks created in 1788.