The British policy of trying to interdict neutral trade with France. The British had stopped merchant ships on the high seas that inevitably alienated the United States of America. 18th June 1812, the US Congress declared war on Britain. The American War of 1812 was a combination of land and sea battles in America during the Napoleonic period.
The Treaty of Ghent signed between the British and Americans on 24th December 1814. This marked the end of the war, but the news took time to reach the United States.
The Battle of New Orleans was the last battle fought, on 17th February 1815, the American War of 1812 was over.