Around 1803 Britain and France renewed their war which put America's neutrality to test. The French fleet was defeated by the British Navy, thus giving the British empire control over the seas. At first, this situation benefited American merchants, as they would buy coffee and sugar brought from French and Spanish colonies to Europe. But Great Britain wasn't very happy about it as the price of their products were affected.
After invoking the Rule of 1756, which stated that "ports should not be open during war to neutral replacements", Britain began a blockade of French-controlled European ports. They also seized American Merchant ships, and even took alleged British deserters off American vessels and returned them to their service. The problem was that some of these men were not British born, but U.S. born citizens. So Jefferson decided to resolve this crisis by economic pressure.
Through The Embargo Act. Jefferson denied both Great Britain and France American goods. This Act stopped exports and prohibited the departure of merchant ships for foreign ports. Import was also eliminated as foreign ships couldn't bring goods and leave without cargo. During the last months of his administration, Congress replaced the Embargo Act with the Non-Intercourse Act, that banned trade with England and France but allowed it with other countries.