James Allan Thomson was born on 27 July 1881 in the Otago Boys' High School rectory in Dunedin, New Zealand, where his father, George Malcolm Thomson, was science master. His mother, Emma Allan, came from a Scottish Presbyterian family of Otago early settlers. He showed early promise as a student attending Kaikorai District School from 1888 to 1894 and Otago Boys' High School from 1894 to 1899. At the University of Otago he qualified BSc with first-class honours, became an associate of the Otago School of Mines, and was senior scholar in geology in 1902. In 1904 he won an exhibition scholarship, which he declined when he was selected as New Zealand's first Rhodes scholar. This enabled him to study at St John's College, Oxford, where he took the degrees of BA and MA and was Burdett-Coutts scholar in 1906. He was captain of his college rugby team as well as a member of the London Scottish First XV, and was also a keen rower and long-distance runner.
Allan Thomson was appointed lecturer in geology in 1907 and demonstrator in petrology at the University of Oxford in 1908. He returned to New Zealand in 1909 to marry Gertrude Alice Keam in Dunedin on 11 March. In the same year Thomson accepted a position in Western Australia surveying the Kalgoorlie goldfields. He published a number of papers on his results, which earned him a DSc from the University of New Zealand in 1912. He was then accepted as the geologist with Robert Falcon Scott's expedition to the Antarctic, but developed pulmonary tuberculosis and had to withdraw.
In 1911 Thomson was appointed as palaeontologist with the New Zealand Geological Survey in Wellington. He remained there until 1914 when he succeeded Augustus Hamilton as director of the Dominion Museum. Despite constant poor health, Thomson became an energetic and effective administrator. He revitalised the museum, improving its organisation and instituting effective policies for improved curatorial practices and active research which gave it a leading place in New Zealand science and culture.
As an ex officio member of the Board of Science and Art, Thomson served as secretary from its first meeting in 1916 and, when the board established the New Zealand Journal of Science and Technology in 1918, he became its editor. In 1923 he and his father published a comprehensive review of scientific research in New Zealand: it documented the unco-ordinated and overlapping research carried out by various organisations, government departments and private individuals. They pointed to a clear need for an official body to provide scientific advice to the government, a function then unofficially carried out by the New Zealand Institute. This role was filled by the Department of Scientific and Industrial Research following its establishment in 1926.
Despite the responsibilities of his museum directorship, Thomson continued an active scientific career. His masterly studies of brachiopods included a monumental work on the collections of the Australian Antarctic Expedition of 1911–14 and culminated in his outstanding book, Brachiopod morphology and genera (Recent and Tertiary), published in 1927. These benchmark works are still highly regarded. He was honoured in 1923 by the award of the New Zealand Institute's Hutton Memorial Medal. From 1914 to 1928 he was government representative on the institute's board of governors, and was elected one of the original fellows in 1919 and its president in 1928.
Thomson's publications on geology are models of clarity and advanced thinking. He is especially remembered for formulating the principles that have guided later workers in devising a classification of Cretaceous and Cenozoic marine strata that is specific to New Zealand. His term, Notocene, for deposits formed between the Hokonui and Kaikoura mountain-building episodes, remained current for many years. He was also a petrologist of standing, having published major works on Western Australian minerals and rocks, Antarctic volcanic rocks, and volcanoes of the New Zealand–Tonga volcanic zone.
Thomson faced great difficulties in his personal life. His wife, Gertrude, died in Wellington on 16 December 1915 leaving two young children, Margaret and Allan Priestley. His health was too poor to maintain a family home and he spent periods in the Pukeora Sanatorium, and finally in a nursing home in Karori where his children could join him. He was a competent pianist, and his enjoyment of playing Brahms was a principal part of his relaxation. In 1922 he wrote a paper on a method of proportional representation in New Zealand, and he also wrote The Taieri Allans and related families, a history of his wife's family, published posthumously in 1929. He was a founding member of the Institute of Pacific Relations in 1926.
Contemporaries remembered Thomson as a courteous and kindly man who faced difficulties with great courage. He died at Wellington on 6 May 1928. In his short life he had made a remarkable contribution to science in New Zealand. His work, and that of his father, was recognised with the establishment in 1985 of the Royal Society of New Zealand's Thomson Medal.