Under the First French Empire, he distinguished himself at Austerlitz in December 1805. A year later he became brigadier general after fighting at Prenzlau, Stettin, and Golymin. After being posted to Spain to fight in the Peninsular War, he suffered defeats at the hands of the Spanish forces in Catalonia at Bruch Pass and Manresa. In September 1810 he was captured at La Bisbal and spent the remainder of the Napoleonic Wars in British custody. Historian Charles Oman called Schwarz unlucky.