Hamilton served for FitzRoy until the latter was recalled, and then worked under the next governor, George Grey. Hamilton returned to England in 1846. He returned on in 1848 as a survey officer. From inland explorations, geographic features were named for him, including Hamilton Plains on the Waiau River, and the nearby Mount Hamilton. In 1849, he attempted the first known ascent of Mount Tapuaenuku in the Kaikoura Ranges. He was with Edward John Eyre, Lieutenant-Governor of New Munster, and seven Māori. They came within a short distance of the summit but were forced to turn back. In 1850, Governor Grey appointed Hamilton resident magistrate for Wanganui, which was a significant responsibility for a person aged 25.
Hamilton held the post in Wanganui for about half a year only before he took on another role at Port Cooper. At Lyttelton, he was appointed collector of customs for Canterbury in August 1853. On 6 November 1855, Hamilton married Frances Townsend, daughter of James Townsend of Ferrymead. She was the eldest sister of the artist Mary Townsend. In the first elections for the Canterbury Provincial Council on 31 August 1853, five people contested the three available positions in the Town of Lyttelton electorate. Hamilton came a close second, and was thus returned; the other successful candidates were Isaac Cookson and Christopher Edward Dampier as Provincial Auditor under Henry Tancred. During a day of low attendance in October 1854, Richard Packer secured a suspension of the council's standing orders, which allowed him to have the first two readings of a bill to enlarge the council's membership by 12 additional members passed. Whilst there was justification for such a measure due to the long session lengths, the Executive Council consisting of Tancred, Henry Godfrey Gouland, Charles Simeon, and Hamilton regarded the matter as a vote of no confidence and resigned. He was a member of Tancred's second Executive Council and on the Executive led by Packer. He retired at the end of his term as provincial councillor in July 1857 and did not seek re-election. He was appointed resident magistrate of Christchurch in February 1856. When he left the customs service, he became receiver of land revenue. He retired in 1874. For some time, he was manager of the Union Bank in Lyttelton. In 1861, Charles Bowen sold his interest in the Lyttelton Times to William Reeves and Hamilton. He was a governor of Christ's College, and was on the board of Canterbury College. As a resident magistrate, he was widely respected for his fair dealings. His contribution to the provincial government was regarded as valuable, especially his understanding of finances. As a government official, he was perceived by William Ellison Burke, the avid recorder of Canterbury personalities in the 1850s and 1860s, as "crotchety official – a wearisome magistrate". Burke wrote:
Mr. H. was notoriously the most perfect embodiment of red tape who ever held office in Canterbury. His memos and questions upon documents were masterpieces and calculated to try the patience of the most saintly. As a magistrate he was a drawler and doubter and questioner who ever sat on the Bench of Christchurch. He had a supercilious style when he chose to be offensive and was very inquisitive.
Hamilton died on 6 December 1883 at his home in Latimer Square. Colleagues from the Lyttelton Times were pall bearers and carried the coffin from his home to Barbadoes Street Cemetery. His wife died in 1889.