On June 18, 1812, the War of 1812 began as the US declared war against Britain. From the article:
"War of 1812 begins
The day after the Senate followed the House of Representatives in voting to declare war against Great Britain, President James Madison signs the declaration into law—and the War of 1812 begins. The American war declaration, opposed by a sizable minority in Congress, had been called in response to the British economic blockade of France, the induction of American seaman into the British Royal Navy against their will, and the British support of hostile Indian tribes along the Great Lakes frontier. A faction of Congress known as the “War Hawks” had been advocating war with Britain for several years and had not hidden their hopes that a U.S. invasion of Canada might result in significant territorial land gains for the United States.
In the months after President Madison proclaimed the state of war to be in effect, American forces launched a three-point invasion of Canada, all of which were decisively unsuccessful. In 1814, with Napoleon Bonaparte’s French Empire collapsing, the British were able to allocate more military resources to the American war, and Washington, D.C., fell to the British in August. In Washington, British troops burned the White House, the Capitol, and other buildings in retaliation for the earlier burning of government buildings in Canada by U.S. soldiers.
In September, the tide of the war turned when Thomas Macdonough’s American naval force won a decisive victory at the Battle of Plattsburg Bay on Lake Champlain. The invading British army was forced to retreat back into Canada. The American victory on Lake Champlain led to the conclusion of U.S.-British peace negotiations in Belgium, and on December 24, 1814, the Treaty of Ghent was signed, formally ending the War of 1812. By the terms of the agreement, all conquered territory was to be returned, and a commission would be established to settle the boundary of the United States and Canada.
British forces assailing the Gulf Coast were not informed of the treaty in time, and on January 8, 1815, the U.S. forces under Andrew Jackson achieved the greatest American victory of the war at the Battle of New Orleans. The American public heard of Jackson’s victory and the Treaty of Ghent at approximately the same time, fostering a greater sentiment of self-confidence and shared identity throughout the young republic.