Fry joined the British Army in May 1878, when he was commissioned a second lieutenant in the West Yorkshire Regiment. He served in the Second Anglo-Afghan War 1878–80, was promoted to lieutenant on 7 January 1880, to captain on 20 January 1886, and to major on 27 July 1898. After the outbreak of the Second Boer War in October 1899, he went with the 2nd battalion of his regiment to South Africa. The battalion was attached to the field force ordered to relieve the besieged town of Ladysmith in Natal, and as such he took part in the battles of Colenso "(December 1899)", Spion Kop "(January 1900)", Vaal Krantz and the Tugela Heights "(February 1900)". He assumed command of the battalion with the brevet rank of lieutenant-colonel on 23 February 1900, a week before the force relieved Ladysmith on 1 March 1900. The battalion stayed in Natal from March to June 1900, and took part in operations at Laing's Nek, then served in Transvaal from July that year. He stayed in South Africa until after the end of the war in June 1902, and left Cape Town on the SS "Orient" in October that year. For his service in the war he was mentioned in despatches, received the Queen's Medal with five clasps, and was appointed a Companion of the Order of the Bath (CB).