James Hector was born in Edinburgh, Scotland, on 16 March 1834, the son of Alexander Hector, conveyancer and Writer to the Signet, and his wife, Margaret Macrosty. He married Maria Georgiana Monro, daughter of David Monro, speaker of the House of Representatives, in Nelson, New Zealand, on 30 December 1868; they had three sons and three daughters.
Hector was educated in Edinburgh, graduating in medicine from the University of Edinburgh in 1856, having taken lectures in botany and zoology, and apparently having gained some training in geology. His potential was recognised by leading Scottish biologists and geologists, and in 1857 he was recommended by Sir Roderick Murchison for the position of surgeon and geologist on John Palliser's expedition to western Canada. On this expedition Hector established himself as a field geologist, natural historian and explorer, working in rugged conditions and relying on his own resources. For his work in Canada he was elected fellow of the Royal Society of Edinburgh, and fellow of the Royal Geographical Society.
Then, again on the recommendation of Murchison, he was appointed director of the Geological Survey of Otago, New Zealand, in 1861. In Canada Hector had acquired the belief that in carrying out a geological survey in a largely unknown country the other natural resources should not be neglected. To this end he assembled the nucleus of a staff. W. Skey was engaged to analyse the rocks and minerals, J. Buchanan as a draughtsman and R. B. Gore as clerk. Hector had the ability to use and develop all the talents of people who worked with him. Thus Buchanan was given scope for botanical work and for using his artistic abilities, and Gore carried out meteorological observations and recording.
By September 1862 Hector had explored the eastern districts of Otago, visited Central Otago, and accumulated a collection of 500 specimens of rocks, fossils and minerals. During 1863 he extended his investigations to the West Coast, carrying out a double crossing between Milford Sound and Dunedin, a pioneering effort in exploration and geological reconnaissance. He organised displays of his maps and collections at the New Zealand Exhibition in Dunedin in 1865.
His work in Otago brought his name and talents to the attention of the central government, which was considering the establishment of a colonial geological survey. In negotiations with ministers over his possible appointment as director of such an institution, Hector detailed his ideas on the scope of the survey and the functions of an associated scientific museum and laboratory. His concept was largely accepted and in 1865 he was appointed director of the Geological Survey and Colonial Museum in Wellington. The institutions were established and developed along the lines Hector had suggested, and reveal his abilities as a planner and organiser.
The work of the survey and museum, which Hector saw as a single unit, soon fell into a pattern. Hector worked strenuously in the field during the summer with such of his staff as could be spared, together with temporary assistants. For the rest of the year they were all involved writing up reports, classifying specimens and arranging them in the museum. Three of his staff who had come with him from Otago continued to work loyally for many years. Buchanan retired in 1885, Skey was transferred to the Mines Department in 1892, and Gore retired in 1901. Other scientists who worked for the survey and museum under Hector were A. McKay, T. W. Kirk, S. H. Cox, J. Park and F. W. Hutton.
On 10 October 1867 the New Zealand Institute Act established an institute to encourage the spread of scientific knowledge. Under the act the museum and laboratory became the property of the institute, the director of these institutions becoming manager. Hector managed the institute under a board of governors until 1903. The survival and expansion of the institute – known after 1933 as the Royal Society of New Zealand – and its continued production of an annual volume of scientific publications is one of Hector's major accomplishments.
Hector was the only scientist of standing in government service, so it was not surprising that other small scientific and quasi-scientific bodies, established in response to the needs of a developing country reliant on its natural resources, were placed under his control. He was responsible at various periods for the Meteorological Department, the Colonial Observatory, the Wellington Time-ball Observatory and the Botanic Garden of Wellington, and for the custody of the standard weights and measures and the Patent Office library.
The functions of many of these subsidiary services were of great interest to Hector. In Otago his staff had carried out meteorological observations, and he was personally interested in building up meteorological statistics. He was always concerned with the introduction of plants which could be used for timber, shelter, food or as the basis for an industry. His view of the function of the botanic garden centred around the acclimatisation of useful plants, their display to the public and their propagation; hence his introductions of species of pines, and of the mulberry as a possible source of a silk industry.
Hector was often asked for official advice on a wide range of scientific, technological, medical and commercial problems. In his prime he had the ability to write clear, concise, balanced reports, many of which are remarkably well based, particularly in light of the limited literature and other resources available.
He wrote 45 scientific papers, which were published in the Transactions of the New Zealand Institute, on geology, botany and zoology; produced a Catalogue of the Colonial Museum (1870) and a Catalogue of the Colonial Museum library (1890). He prepared a Handbook of New Zealand (1879, revised in 1880, 1883 and 1886); in format and content it foreshadowed the New Zealand official yearbook more closely than the earlier 1875 handbook (edited by Julius Vogel). He oversaw the publication of the annual reports of the Colonial Museum and Laboratory, and the annual Reports of geological explorations. In 1886 he published his Outline of New Zealand geology, a summary of the first 20 years' work of the Geological Survey.
Besides providing an avenue for publication in the Transactions, Hector stimulated the preparation and publication of a series of catalogues, manuals and handbooks by the Colonial Museum. Between 1871 and 1881 these covered birds, fishes, echinoderms, mollusca, crustacea, beetles, flies, wasps, grasses and flax. These were pioneer works and in many cases were not replaced by more authoritative guides for many years. In addition educational material on species readily obtainable was given in the four Studies in biology for New Zealand students, dealing with shepherd's purse, the bean plant, mussels, and the skeleton of the crayfish.
Hector was more than once involved in controversy. In 1874 he quarrelled with Julius Haast over his public revelation of the results of Haast's 1872 excavation at Sumner; Hector was vindicated in 1875 by Joseph Dalton Hooker, president of the Royal Society. More serious were the criticisms which, in the 1880s, scientists such as John Turnbull Thomson, George Thomson and Frederick Hutton began to make of the management of the New Zealand Institute and of the inadequacies of its annual volume, the Transactions.
As a result the management of the institute was separated from that of the government departments under Hector's control. The Geological Survey was handed over to the Mines Department in 1886 and removed from Hector's control in 1892. Other subsidiary units were dispersed. These reforms probably owed more to the Liberal government's desire for economy than to a supposed personal vendetta between Hector and Richard Seddon. The result was to leave Hector as director of the Colonial Museum and manager of the New Zealand Institute, with a greatly reduced staff and budget. The constitution of the institute was reviewed in 1903, leading to its control by a more representative group, but nothing was done to effect urgently needed repairs to the museum.
Hector was due to retire in October 1903, somewhat embittered and in poor health. He secured leave of absence and travelled to Canada in July, when official appreciation of his work on the Palliser expedition was blighted by the sudden death of his son Douglas, who had accompanied him. He returned to New Zealand in 1904.
The new constitution of the New Zealand Institute allowed for the annual election of a president. In recognition of his long service to the institute, Hector was elected the second president (in succession to Hutton) in 1906. He died at Lower Hutt on 6 November the following year.
During his career Hector received many honours, including FRS (1866), Order of the Golden Cross (1874), CMG (1875), the Lyell Medal of the Geological Society (1876) and KCMG (1887). In 1891 he was awarded the Royal Geographical Society's Founder's Medal. He was appointed to the council of the University of New Zealand and to the university senate in 1871, and was chancellor of the university from 1885 to 1903. The New Zealand Institute honoured him in 1911 by establishing the Hector Medal and Prize as their major award for excellence in research.