Born in Kreuzburg (today's Slavskoye, Russia) in East Prussia, Boyen joined the army in 1784 in Königsberg.
After the Treaty of Tilsit (July 1807) he became a major and a member of Gerhard von Scharnhorst's commission for military re-organisation.
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.
For 21 years Boyen lived in retirement, occupying himself with historical studies, until King Frederick William IV, immediately after ascending the throne, recalled him to active service, and promoted him to general of the infantry.