Americans had been prohibited by law from importing slaves for over fifty years before abolition. The 1808 Act to Prohibit the Importation of Slaves made it a federal crime for anyone to bring slaves into America; this Act expanded on previous laws forbidding Americans to own or invest in slave importing ships and businesses. Its passage was not a surprise to anyone in the slave trade - Congress was planning to ban it the second its Constitutional protection expired on January 1, 1808 and then-President Jefferson wrote in an open, and widely reproduced, letter:
I congratulate you, fellow-citizens, on the approach of the period at which you may interpose your authority constitutionally, to withdraw the citizens of the United States from all further participation in those violations of human rights which have been so long continued on the unoffending inhabitants of Africa, and which the morality, the reputation, and the best interests of our country, have long been eager to proscribe.
The foreign ships legally participating in the trade had several years of warning that the law would change, and the likelihood of any one ship being caught out is very low - these were operated by businesses with owners that kept an eye on the political climate and read the papers.
The Act wasn't enforced too strictly, and limited smuggling continued for years. The Clotilda is the last known slave ship, and it arrived in the US in 1860 before being burned to conceal its existence. Any smuggling operation much later than that would be very unlikely for the same reasons as the 1808 Act above, but even more so: the political landscape was rapidly and obviously shifting to make doing so difficult.
The final abolition of slavery in the US occurred in 1865, and the Emancipation Proclamation was issued in 1863, after the Civil War had already broken out. Union strategy included a blockade of the Confederacy, and it achieved a significant cordon by the 1863 proclamation. Smuggling continued, but the demand for shipping in slave states was much less for human cargo than for cotton (export) and war material (import).