Hamilton was born in Ireland in 1854, and after studying at the Hermitage School, Bath, joined the army as a lieutenant in the 1st Battalion, Queen's Royal Regiment, on 9 August 1873. He served in the Second Anglo-Afghan War from 1878 to 1880 as the aide-de-camp to General J. M. Primrose, and was mentioned in despatches. In 1883 he was promoted to captain, and served with the 2nd Battalion in the Third Anglo-Burmese War before being appointed a brigade-major under Sir William Lockhart in 1887. He then was appointed a brigade-major at Cawnpore from 1887 to 1888, continuing in India as the Inspector of Signals in the Punjab and Bengal from 1888 to 1893. During this period, he oversaw signals in the Hazara Expedition of 1891. He married Isabel Harris, daughter of General Philip H. F. Harris, in 1886; they would have one son and two daughters. The best man at their wedding was Hubert Hamilton, a fellow captain in the regiment. He served in the Tochi Valley in 1895 under Lockhart, and served on the staff of the Malakand Field Force in 1897. He returned to field service that same year with the 2nd Battalion, Queen's Royal Regiment, as the second-in-command of the Tirah Expedition, with a brevet-promotion to lieutenant colonel.
Regimental and senior command
He commanded the 2nd Battalion, the Queen's Royal Regiment during the early stages of the Second Boer War, in 1899, and then commanded the 2nd Brigade from April 1900 to the end of hostilities in May 1902. For his services in South Africa, he was mentioned in despatches and appointed a Companion of the Order of the Bath in the South Africa honours list published on 26 June 1902. He left Cape Townon board the SS Walmer Castle in late June 1902, and arrived at Southampton the following month. His period of service in command of the 2nd battalion ended in late September 1902, when he was placed on half-pay. He received the actual decoration of CB from King Edward VII during an investiture at Buckingham Palace on 24 October 1902. In early October 1902 he was placed under orders to go to India, where he was to take up command of the Wellington district in Madras. Later, he was appointed to command the 1st Brigade of the Secunderabad Division in India, promoted to major-general in 1906 and relinquishing command in 1907. He was general officer commanding of Army forces in West Africa from 1908 to 1911, and then Lieutenant Governor of Guernsey—and correspondingly commander of the forces in Guernesy and Alderney—from 1911 to his retirement in 1914. Shortly after his retirement, following the outbreak of the First World War, he was brought back to serve as the first commander of the newly raised 20th Division in the New Armies. He held the command less than a month before handing over to Richard Hutton Davies, a New Zealand officer who had been invalided home from the Western Front. His final military position was a purely ceremonial one; from 1914 to 1920 he was colonel-in-chief of the Queen's Royal Regiment.