The act abolished the slave trade in the British empire. The trade had begun in 1562, during the reign of Elizabeth when John Hawkins led the first slaving expedition.
The people who pushed the act through were a group of Evangelical Protestants allied with Quakers and united in their opposition to slavery and the slave trade. The Quakers had long viewed slavery as immoral, a blight upon humanity. By 1807 the anti-slave-trade groups had a very sizable faction of like-minded members in the British Parliament. They controlled, at their height, some 35-40 seats.
Known as the "saints" this alliance was led by William Wilberforce, the most important of the anti-slavetrade campaigners. These parliamentarians had access to the legal draughtmanship of James Stephen Wilberforce's brother-in-law, and were extremely dedicated. They often saw their personal battle against slavery as a divinely ordained crusade.
In addition, many who were formerly neutral on the slavery question were swayed to the abolitionist side from security concerns after the successful Haitian Revolution in 1804.
Their numbers were magnified by the precarious position of the current government under Lord Grenville (his short term as Prime Minister was known as Ministry of All the Talents). Not long after the act was passed, Grenville's government lost power to the Duke of Portland. Despite this change, the later British governments continued to support the policy of ending the slave trade.
After the British ended their own slave trade, they felt forced by economics to press other nations into placing themselves in the same economic straitjacket, or else the British colonies would become uncompetitive with those of other nations. The British campaign against the slave trade by other nations was an unprecedented foreign policy effort. The United States also abolished its African slave trade at the same time, though it did not attempt to abolish slavery then practised within American borders.
Both the British and American laws were finalized in March of 1807, the British law being effective on May 1, 1807 and the American law on January 1, 1808. Other small trading nations that did not have a great deal to give up, such as Sweden, quickly followed suit, as did the Dutch, who were also by then a minor player.
The British navy declared that ships transporting slaves were the same as pirates, and so ships carrying slaves were subject to destruction and any men captured were (potentially) subject to execution. Enforcement of the US law was less effective, and the US government refused to comply with joint enforcement (partly because of concern over British impressment).