Davidson later saw action in South Africa in the Anglo-Zulu War of 1879, during which he was wounded in the final battle of the war at Ulundi. He was promoted to captain in January 1880, and in the same year he fought in the second phase of the Second Anglo-Afghan War. Lord Napier was appointed Governor of Gibraltar in 1876, with Davidson once again becoming his "aide-de-camp" from December 1881 to December 1882. Following this he returned to service in British India, where he was promoted to major and was seconded to the Indian Ordnance Department. Further promotions in the Royal Horse Artillery followed in January 1896, when he was promoted to lieutenant colonel, and colonel in January 1900. This coincided with his appointment to the staff of the Royal Artillery in South Africa during the Second Boer War. He commanded the Royal Horse Artillery on their march to relieve Kimberley, and was present at several other engagements, including the Battles of Paardeberg, Poplar Grove, and Driefontein. Davidson was mentioned in dispatches for distinguished actions during the war. He vacated his position on the staff in January 1901, and was placed on the half-pay list, but returned to the staff in October of the same year. For his service in the war, he was decorated with the Queen's Medal, with four clasps. In April 1901, he was made a Companion to the Order of the Bath. Following the war, he returned to Britain where he was Colonel of the Staff commanding the Royal Artillery, North-Eastern District, before vacating the post and being placed on the half-pay list in October 1904. Three years later, in January 1907, he retired from the army.