I assume you mean the period just before the War of 1812. Great Britain and France were at war with each other, and although the United States was nominally neutral, American merchants frequently traded with both sides. Each side attempted to prevent this from happening. Britain issued Orders in Council which prohibited trade with continental Europe, and declared that all ships must be licensed if bound for the continent, and must call at a British port. The French under Napoleon proclaimed his continental system which was a blockade of French ports, and declared that any ship which complied with the British Orders in Council was subject to seizure. The British practice of impressment--seizing sailors from American ships who presumably were deserters--aggravated the situation even further. Britain appeared to be the chief offender; but France caused equally hard feelings. In an attempt to prevent American involvement in a totally European war Congress at the behest of President Thomas Jefferson passed the Embargo Act of 1807 which stopped the export of American goods and prohibited American ships from leaving for foreign ports. It proved to be a disastrous plan.
I assume that you are talking about the embargo imposed by Pres. Thomas Jefferson in 1807. If so, the US placed the embargo in order to force Britain and France to remove the restrictions that they rance and Britain had put on trade between the other country and neutral countries.
During this time, France and Britain were at war. Each side wanted to stop the other from being able to trade with neutral countries like the US. They wanted to do this to hurt the other country. But this was really hard on the US. Their ships, bound for France or Britain, were being stopped and that really hurt trade. This had a major negative impact on the US economy.
In order to stop this from happening, the US imposed this embargo. They hoped to put pressure on the British and the French by depriving them of US goods.
As the link below says,
The Embargo Act was intended to use economic pressure to compel England and France to remove restrictions on commercial trading with neutral nations that they imposed in their warfare with each other.