Lillie joined the 6th Warwickshire Regiment of Foot in 1807 as an ensign. The following year he embarked under Sir Brent Spencer in first expeditionary force to Portugal for service in Barbary, Cadiz and the Tagus. He joined the Lusitanian Legion of the Portuguese Army in the rank of captain, when still only 19 years old, under the watchful eye of Lieutenant-General William Carr Beresford, who raised the famous élite corps of light infantry, the Caçadores. Having taken part in engagements in defence of Portugal, Lillie was promoted lieutenant in 1810. He fought at the Battle of Bussaco and took part in the retreat to the Torres Vedras Lines. In 1812 at the Battle of Salamanca, he was reputed to have personally seized the Colours of the 116th French Line Regiment during the struggle for Arapiles. As commander of the 7th Caçadores, he led his troops into the Battle of the Pyrenees, Battle of Nivelle (1813), Battle of Orthez (1814) and finally, the Battle of Toulouse (1814), where he was gravely wounded (for the third time) and left for dead for 48 hours on the battlefield. He was awarded the Decoration of The Lily by the French. By the British he was awarded the Army Gold Cross, (later) he was honoured with the Military General Service Medal. In Wellington's army his progression was somewhat slow; he left the Peninsula Campaign in the rank of major and in 1816 he was knighted by patent. In the 1831 Coronation Honours, he was made a Companion of the Bath. Also that year, Pedro of Portugal, promoted him to the rank of major general in the Portuguese Army. By the time he took formal retirement from the British Army, in 1855, he had attained the rank of lieutenant colonel with the commensurate pension. He left a record of his experiences in the war.