After the defeat of Prussia in the Fourth Coalition, his state remained under the control of France, however, and was formally made a part of the short-lived Napoleonic Kingdom of Westphalia in 1807.
Frederick William fled to his parents-in-law in Bruchsal in the Grand Duchy of Baden, which had remained a sovereign state with the dissolution of the Holy Roman Empire in 1806 by Francis II, where he lived for the next few years.
He financed the corps independently by mortgaging his principality in Oels, and made his way from Austrian Bohemia through the French-allied states of Saxony and Westphalia to the North Sea coast.
Frederick William briefly managed to retake control of the city of Braunschweig in August 1809, which gained him the status of a local folk hero.
He was killed by a gunshot at the Battle of Quatre Bras on 16 June, the night after he had attended the Duchess of Richmond's ball in Brussels and left it happy to have a chance to show his fighting ability.