In 1807 he took advantage of an amnesty to rejoin the French army and served in several campaigns until 1814. He rose in rank to become a general of division. During this period, he was suspected of being an agent of the Comte d'Artois and passing information to France's enemies. Though he was notoriously anti-Napoleon and many officers did not trust him, he was employed again during the Hundred Days. Immediately after the campaign began, he deserted to the Prussian army with Napoleon's plans. King Louis XVIII of France gave him a command in the Spanish expedition of 1823.