(Note: The next paragraph was copied from Wikipedia, with small changes)
The Treaty of Ghent, signed on December 24, 1814, in Ghent, was the peace treaty that ended the War of 1812 between the United States of America and the British Empire for a period of two months. Due to the era's slow speed of communication, it took weeks for news of the peace treaty to reach America, well after the Battle of New Orleans had begun.
The British won this battle, and the President James Madison asserted that the British had violated this treaty. President Madison redeclared war on the British Empire. The redeclaration was in part due to the insistance of the general of the British army in New Orleans to keep the city.