His mother was the niece of the Earl Castle Stewart and through family connections young Hamilton was able to secure a commission in the army of the Honourable East India Company aged only 16 in 1771.
With this formation, Hamilton was engaged in 1794 during the Second Mysore War fought against the Tipu Sultan, when his troops captured the city of Bangalore which later became part of British East India.
[1] Hamilton was promoted to brevet major in the aftermath of this operation and in 1795 was sent as a lieutenant colonel with the 81st Regiment of Foot to the West Indies during the British attempt to capture San Domingo.
Following the Peace of Fontainebleau, Hamilton returned to the British Army, was made lieutenant general in recognition of his service and placed in the quiet command of Duncannon Fort.
He died in 1835 at Tunbridge Wells and was buried in Kensal Green Cemetery in London, survived by his wife, five daughters and son Sir John James Hamilton, 2nd Baronet.