(Studies of the peppered moth were done in the 1950s well after Darwin's death.)
While Darwin may have harboured some of the racial thinking prevalent in his day he was strongly in favour of abolition and deplored slavery. His experience of slavery came first hand from experience in South America during the voyage of the Beagle.
These are a couple of extracts from his personal correspondence.
Some few, & I am one, even wish to God, though at the loss of millions of lives, that the North would proclaim a crusade against Slavery. In the long run, a million horrid deaths would be amply repaid in the cause of humanity. — Great God how I should like to see that greatest curse on Earth Slavery abolished.
— Charles Darwin, 5 June 1861, to Asa Gray
But I will not write on this subject [of slavery]; I shd. perhaps annoy you & most certainly myself. — I have exhaled myself with a paragraph or two in my Journal on the sin of Brazilian slavery… My few sentences, however, are merely an explosion of feeling. How could you relate so placidly that atrocious sentiment about separating children from their parents; & in the next page, speak of being distressed at the Whites not having prospered; I assure you the contrast made me exclaim out. — But I have broken my intention, & so no more on this odious deadly subject.
— Charles Darwin, 25 August 1845, to Charles Lyell
OB