He served in the Boer War in South Africa (1899–1902), and was present at the Relief of Ladysmith, Colneso, Tugela Heights, and the Battle of Spion Kop. At Spion Kop, he helped wounded soldiers while under fire, for which he was appointed a Companion of the Distinguished Service Order (DSO) in 1900. He was also twice mentioned in despatches (1901). He received the Queen's medal with six clasps and the King's medal with two clasps. Stansfeld later served in India and Egypt (1910–14), at Sialkot, Peshawar, Calcutta and Cawnpore, and participated in the Delhi Durbar (1911), before returning to Europe in 1914.