These answers may be useful:
by /u/girlscout-cookies in Why was Britain so heavily abolitionist in the 19th century?
by /u/agentdcf and /u/sowser in Was Britain's abolition of the slave trade a selfless act of virtue or were there any ulterior motives behind the decision?