John Molloy was able to buy a commission in the Rifle Brigade on 17 December 1807, just over three months after his 21st birthday, when he came into his inheritance. He fought in the Peninsular War of 1808–10 and was promoted to lieutenant in 1809. Then, during a two-year break in military engagements, he attended the Royal Military College, at Great Marlow. From 1812 to 1814, he fought in the Napoleonic Wars under Wellington, taking part in eight battles. In 1815 he fought at Waterloo where he was badly wounded and received the Waterloo Medal. After recovering his health, he returned to active duty, being posted to Glasgow in 1819–20, then Ireland until 1825. In 1824 he was promoted to captain.