His father was the fifth son of the Scottish antiquarian William Hamilton[2] who had married the heiress Charlotte Styles, and so acquired the Essex manor of Holyfield (Hallifield), in the north-east of the parish of Waltham Holy Cross which remained in the family into the 19th century.[3]
In 1799 he was appointed chief private secretary to Thomas Bruce, 7th Earl of Elgin. He was in Egypt as the British took it over from the French, secured the Rosetta Stone and superintended its transport to England.[5] "He also superintended the shipment of the Parthenon sculptures for Lord Elgin and the recovery of those subsequently lost at sea."[6] After a voyage up the Nile, he wrote a well-known work of Egyptology, Ægyptiaca.[7]
In 1830 he succeeded Sir Thomas Lawrence as Secretary of the Society of Dilettanti, a post which he held until his death in 1859. He was also a Trustee of The British Museum from 1838 until 1858, and donated a number of antiquities to the institution.[6] Upon Hamilton's resignation as trustee of the British Museum, Sir Frederic Madden, the Keeper of Manuscripts, recorded in his diary on 11 February 1858:
"I was informed today that Mr W. R. Hamilton, the Trustee, had resigned. God be thanked! This is the man who has carried his Italian friend [ Antonio Panizzi, q.v.] through thick & thin from the time when he first came to the Museum to the present time. A more prejudiced person never existed, nor a greater jobber, when it related to himself or his friends. A man also of violent temper & insolent tongue, whose only & sole aim at the Museum seems to have been to glorify Mr. P. and abuse every thing but the Elgin Marbles. I say again, God be thanked he is gone, and I hope never again to see his ugly face and his crooked legs! He is the only man who ever insulted me in the Committee Room, & yet mean enough to solicit me to lend myself to his dirty jobs, which I always refused to do. The officers of the Department of Antiquities know better than myself what a curse this man has been to the Museum as a Trustee!"[6]
Personal life
On 3 September 1804 Hamilton was married to Julia Udny, a daughter of Selina Shore Clevland (a daughter of John Clevland MP) and John Udny, the British Consul at Venice and Leghorn. Her brother was Lt.-Col. John Robert Fullerton Udny of Udny Castle, Aberdeen. Together, they were the parents of:[8]
William John Hamilton (1805–1867), a geologist who married Martin Trotter, daughter of John Trotter, in 1832. After her death in 1833, he married Hon. Margaret Frances Florence Dillon, a daughter of Henry Dillon, 13th Viscount Dillon.[8]
Alexander Edmund Hamilton (1806–1827), who drowned in India.[8]
Capt. Henry George Hamilton (1808–1879), of the Royal Navy who married Fanny Elizabeth Tower and was the father of Adm. Sir Frederick Hamilton.[8]
Charles Anthony Hamilton (1809–1860), who worked in the Privy Council office and died unmarried.[8]
Arthur Richard Hamilton (1814–1882), who died unmarried.[8]