Was popular opinion fairly united on the issue? Wasn't the West Indian slave/sugar trade insanely profitable? I'm shocked the British would give that up without a civil war. The U.S. had a civil war over the issue. Slavery was abolished in France during the upheaval of the Revolution. What makes British abolition different?
Britain banned the slave trade in 1807.
The Committee for the Abolition of the Slave Trade was formed in 1787 by a group of Evangelical English Protestants. This Committee, led by William Wilberforce, amassed evidence (and propaganda) about the evils of the slave trade, and slowly built up support in Parliament. By the early 1800s there was a block of 35-40 MPs, known as the "Saints", who were opposed to the slave trade. With the Act of Union with Ireland, in 1800, 100 Irish MPs were added to the House of Commons, many of these were against the slave trade, and the Saints were able to horse trade support for their position with most of the rest of the Irish MPs. Finally, they gathered enough support to pass the Abolition of the Slave Trade Act in 1807, which not only banned all British colonies from importing slaves, and all British ships from participating in the slave trade, but which also committed the British government to seek to persuade all other nations to abolish the slave trade as well.
Wilberforce, having succeeded in a 20 year fight to abolish the slave trade, decided that this was not enough. In 1823, he helped found the Anti-Slavery Society, which now worked to abolish slavery in the British Empire. They accomplished this (with a few exceptions where slavery was not abolished until 1843) ten years later with the passage of the Slavery Abolition Act of 1833, three days before Wilberforce died.
Moral reasons were the main reasons for growing British opposition to slavery. It may have helped, however, that new sources of wealth (from industry) were reducing the relative economic importance of the slave holding plantation owners. Although the plantations were still economically valuable, their relative value was declining and the newer wealthy who had made their money from industry (and their "free labor" employees) were likely to come from religious or socio-economic backgrounds that were more opposed to slavery.