In 1796 he fought in the Persian campaign under Valerian Zubov's command at the head of a cossack regiment. On returning from Persia he transferred to the Strarodubov Cuirassier Regiment. He rose to colonel in 1798 but left the army because of illness the same year. The following year he returned to the Strarodubov Regiment under Alexander Rimski-Korsakov's command on its departure for Switzerland and the War of the Second Coalition. He was wounded at the Second Battle of Zurich and rose to general and commander of the Riazan Cuirassier Regiment. In 1800 the regiment was disbanded but he was given the right to continue wearing its uniform.