Hamilton was commissioned into the East Yorkshire Regiment in 1877. He served in the Second Anglo-Afghan War in 1880 and the First Boer War in 1881. He became Commander of the Niger Coast Protectorate Force in Benin City in 1897.