Stansfeld served during World War I, at the First Battle of Ypres, after which he was wounded. He was promoted to the rank of Major in 1914. During 1915, he saw action at the battles of Festubert, Givenchy, and Hulloch, and was mentioned in dispatches. In 1917, he was at the battles of Passchendaele and Cambrai, was twice mentioned in dispatches and awarded the French Legion of Honour and Croix de Guerre and promoted to Brigadier-General. During 1918, he was at Bullecourt, Mount Kemmell, Mercatel and was again mentioned in dispatches. He was appointed a Commander of the Order of St Michael and St George (CMG) in the 1918 New Year Honours. Stansfeld was promoted to Colonel in 1919.