The Americans were advancing down the St. Lawrence River towards Montreal, the capture of which would starve out all British forces west of that point. Secretary of War John Armstrong was playing the role of supreme commander, directly ordering Major Generals James Wilkinson and Wade Hampton to advance with their armies towards the city. However, both generals were turned back by much smaller British forces. Canadian militia also played a significant role.
The defeat of a large American division by a much smaller British "Corps of Observation" at Crysler's Farm is usually attributed to the poor training of the American regulars. I see something different going on. The American soldiers were not being used to their strengths. They were trained (officially) according to William Duane's infantry manual, which took the drill of the French 1791 book (which was heavily influenced by von Steuben and the Prussians) and introduced many of the new practices used by the French Army up until 1811 or so. This meant the Americans were fighting like Frenchmen. They tried to fix the British line in place with a advance in line by Covington's Brigade, while the other two brigades tried to outflank the Brits by marching by column through the woods to the north.
It was a poor use of inexperienced men. The two brigades got tangled in the woods and were handily defeated by the British who were able to refuse their line by wheeling by wings (a standard maneuver which is regarded with some misplaced awe by modern historians.) Throughout the battle, the Americans tended to fire individually, which is actually the suggested drill in Duane's manual. This kind of musketry turned out to be less effective than the tight British platoon volleys--but there's evidence that American regiments continued to open fire by files during the 1814 campaign when they were much more successful. Another factor in the battle was that a large battalion had been formed as a boat guard over the supply flotilla for the division, and took detachments men from all of the regiments instead of just using certain companies or a single regiment. This weakened the American line while throwing together a mixed bag of troops into a provisional unit: a mistake that the British would tend to make during the Niagara campaign.
(Note that I use NATO symbols for the units: X for brigade, III for regiment, II for battalion, wing, division or squadron, and I for company.)