The following year, he decided to leave England's cold climes for the sake of his health, and became a ship's surgeon. In 1862, he arrived in Dunedin, New Zealand where he set up practice, also becoming the city's coroner, a post which he held for over 20 years. During much of this time he was also president of the Otago Branch of the New Zealand Medical Association, and lectured in surgery in the Otago Medical School. Hocken was married twice, to Julia Annia Daykne Simpson in 1867, and Elizabeth Mary Buckland in 1883. Hocken's keen mind and instinct for collecting and preserving the past came to the fore when gold was discovered near Dunedin in 1861. His house, "Atahapara", was located on Moray Place, close to First Church, and here he built up a huge collection of manuscripts and artefacts relating to Otago's history. Fearing the changes that the goldrush, with its rapid influx of population, would bring to the southern South Island, he began to collect books, records, and ephemera from the early years of European settlement. His interests soon spread to New Zealand history in general. He became an expert in this field, presenting papers, writing essays, and assisting with the preparation of exhibits on such diverse topics as Pacific island costumes, early colonial settlement, and extinct New Zealand birds. He was a member of such organisations as the Australasian Association for the Advancement of Science, the Royal Geographical Society, the Royal Historical Society, and the Linnean Society. In 1898 Hocken became a commissioner of the Otago Settlement Jubilee Exhibition, marking 50 years of the province's settlement. In 1903 he travelled to Japan, Greece, Egypt, and Great Britain to conduct his own archaeological and historical research. Whilst in Britain, he collated many documents relating to the New Zealand Company and New Zealand Mission, and managed to secure a large number of them and bring them back to New Zealand. He returned to New Zealand in 1906, and started work on his Bibliography of the Literature Relating to New Zealand. This work, published in 1909, is still regarded as the seminal work on this subject. Hocken offered his historical collection of books, pamphlets, newspapers, maps, paintings, and manuscripts to the citizens of Dunedin, and this was duly inaugurated as the Hocken Library in 1910. This was originally housed in a wing of the Otago Museum and has been administered by the University of Otago to the present. Hocken also presented the Otago Museum with a massive collection of Māori cultural artefacts, which form the basis of its extensive Pacific ethnology collection. Hocken was however too ill to attend the opening of the Hocken Library and died less than two months later. At the time of his death, on 17 May 1910, he was Vice-Chancellor of the University of Otago.