 Hamilton was born in Edinburgh, Scotland.After receiving education at Merchiston Castle School, and in Godesberg, Germany, he later lived in Sundrum, Ayr, Scotland.He was a justice of the peace and farmer in County Ayr.