He studied law in Berlin. In 1807, he joined the army. The Peace of Tilsit made him a subject of the Grand Duchy of Warsaw, and as such he fought in the War of the Fifth Coalition in Spain and Napoleon's invasion of Russia. At the Battle of Leipzig, he was wounded and captured by the Russians, who forced him into the Polish army. In 1816, he entered the Prussian army and became a member of the general staff. He took part in the Polish revolts of 1831 and 1848, the latter of which he helped to suppress. He retired from the army in 1857 with the rank of general of infantry.