In 1839 he was gazetted as an Ensign in the 40th regiment. He was promoted to Lieutenant in 1841, and from 1841-1842 served in the Afghan war with Sir William Nott's force, taking part in the actions of Bolan Pass, Khojak Pass, Quetta, Ghuznee, and Kandahar. He participated in the relief of Killar Shilgie, the occupation of Kabul, and in further actions at Khoord, Kabul, Tyeen, Jugdullah and Khyber Pass (The Punjab and First Sikh War). He was awarded clasps for Kandahar, Ghuznee and Kabul, and received the 1842 Afghan medal.