The British government approached the United States government in January 1814 and proposed negotiations to end hostilities. The Americans agreed, and a delegation was sent to Europe. The site for meetings was the city of Ghent, in Belgium.
The negotiations went back and forth for months, and finally both sides agreed to a settlement that involved no major concessions by either nation.
The treat was agreed to on December 24, 1814. It was ratified by the U.S. Senate on February 17, 1815.
The Battle of New Orleans, in which Americans led by General Andrew Jackson defeated the British on January 8, 1815, took place two weeks after the treaty which officially ended the war.
The two men did not get along very well during their time negotiating with the British, but their careers would be intertwined for years to come as they both went on to play major roles in early 19th century America. Clay and Adams were involved in the election of 1824, which became known as the Corrupt Bargain, and Clay would serve as Secretary of State in the administration of John Quincy Adams.