He returned to Western Australia in 1889, spending some time on the Eastern goldfields, before farming with his father at York until 1895. On the death of his grandfather in 1874, he inherited the station Hasely in Toodyay, which he developed as a farm and stud. He also became a part owner of Mount Barnett cattle station in the Kimberley. In 1895, he married Clara Hicks.
He first became active in public life in 1899, becoming a member of the Toodyay Road Board. He would later become its chairman before retiring his membership in 1906. In 1900 he became a Justice of the Peace, and the following year he unsuccessfully contested the Legislative Assemblyseat of Toodyay as an independent.
He won the May 1916 election by a single vote. Upon a recount, both Hamersley and his opponent, Michael McCabe of the Country Party, had attained 1,651 votes each, and Hamersley was elected on the casting vote of the Returning Officer. McCabe then petitioned the Court of Disputed Returns against Hamersley's election, with the result that the election was declared null and void. Hamersley appealed to the full court, but the appeal was dismissed. A by-election was subsequently held on 2 September 1916, with Hamersley winning re-election on a significantly higher turnout.
He died in West Perth on 24 October 1946. His term of 42 years, 2 months and 19 days remains the longest ever term as a member of the Western Australian Legislative Council.