After graduating from the French military academies, in 1806 he became a captain of grenadiers and adjutant to Marshal Nicolas Oudinot. For his participation in the 1806–07 campaign he received the Virtuti Militari order and the Légion d'honneur. On 30 January 1808 he became captain of the 1st Infantry Regiment of the Duchy of Warsaw. He was then appointed one of the four squadron commanders of the Polish 1st Light Cavalry Regiment of the Imperial Guard) and deployed with that unit from Germany to Madrid. He fought in the anti-guerrilla force commanded by Jean-Baptiste Bessières, including at Somosierra, and escorted Napoleon on his return from Spain to France.