Ludwig strongly rejected the alliance of his father with Napoleon I of France but in spite of his anti-French politics the crown prince had to join the emperor's wars with allied Bavarian troops in 1806. As commander of the 1st Bavarian Division in VII Corps, he served under Marshal François Joseph Lefebvre in 1809. He led his division in action at the Battle of Abensberg on 20 April.