When the US Constitution was written in 1787, a long forgotten and peculiar provision was included in Article I, the part of the document dealing with the duties of the legislative branch:
Section 9. The migration or importation of such persons as any of the states now existing shall think proper to admit, shall not be prohibited by the Congress prior to the year one thousand eight hundred and eight, but a tax or duty may be imposed on such importation, not exceeding ten dollars for each person.
In other words, the government could not ban the importation of slaves for 20 years after the adoption of the Constitution. And as the designated year 1808 approached, those opposed to slavery began making plans for legislation that would outlaw the trans-Atlantic slave trade.
A senator from Vermont first introduced a bill to ban the importation of slaves in late 1805, and President Thomas Jefferson recommended the same course of action in his annual address to Congress a year later, in December 1806.
The law was finally passed by both houses of Congress on March 2, 1807, and Jefferson signed it into law on March 3, 1807. However, given the restriction imposed by Article I, Section 9 of the Constitution, the law would only become effective on January 1, 1808.
In subsequent years the law would have to be enforced, and at times the US Navy dispatched vessels to seize suspected slave ships. An African Squadron patrolled the west coast of Africa, interdicting ships suspected of carrying slaves.
The 1807 law ending the importation of slaves did nothing to stop the buying and selling of slaves within the United States. And, of course, the controversy over slavery would continue for decades, and would not be finally resolved until the end of the Civil War and the passage of the 13th Amendment to the Constitution.