By 1810 Boyen had become Director of the Military Cabinet. In the re-constitution of the Prussian army he functioned as Scharnhorst's most diligent helper, but after the conclusion of the alliance between Prussia and France in 1812 he resigned his commission as a colonel and visited Vienna and St Petersburg. The events of 1813 saw him recalled to the Prussian service: as a colonel he accompanied the Russian army from its base in Kalisz to Saxony. After the Battle of Lützen (2 May 1813) he had charge of the border guards and ultimately the defence of Berlin. But during the truce King Frederick William III named him Chief of General Staff of the 3rd Army Corps. As such, Boyen participated in the battles and skirmishes of 1813 and 1814 and gained promotion to major-general.