He participated in the Battle of Wagram, in the course of which he lost a leg, which was replaced by a wooden prosthesis. Hence his nickname jambe de bois ("wooden leg"), and was assigned to the defense of the Château de Vincennes in 1812. Vincennes was then an arsenal containing 52 000 new rifles, more than 100 field guns and many tons of powder, bullets, canonballs.
A tempting prize for the Sixth Coalition marching on Paris in 1814 in the aftermath of the Battle of the Nations.
However Daumesnil faced down the allies and replied with the famous words "I shall surrender Vincennes when I get my leg back" (Je rendrai Vincennes quand on me rendra ma jambe, with a polysemic pun in French that is lost in translation). With only 300 men under his command, he resisted to the Coalition until king Louis XVIII of France ordered to leave the fortress.