In order to defeat Great Britain in the war of 1812, Madison hoped to gain control of Canada to show Great Britain that the U.S. was a powerful country worthy of respect.
President Madison demanded an end to impressment, well aware that Britain would not make such a concession in wartime. And so Britain went to war, with no troops to spare to reinforce Canada; it would be defended by a handful of British regulars, Native Americans and Canadian militia.