Wheeler led the 48th Native Infantry during the Afghan War in 1838–9, taking part in the capture of Ghazni and Kabul. In December 1840 he returned to India, as part of the escort of the captive ruler of Afghanistan Dost Mohammad Khan who had been replaced by Shah Shujah Durrani. For his part in the campaign Wheeler was twice mentioned in despatches, made a companion of the Order of the Bath, and awarded the order of the Durani Empire.