Robert Haldane Makgill was born on 24 May 1870 at Stirling, Scotland, the son of Margaret Isabella Haldane and her husband, Captain Sir John Makgill of the Royal Engineers. His mother came from a distinguished family: two of her brothers, a sister and a nephew achieved prominence in British public and academic life. Robert also showed unusual intellectual gifts from an early age.
The Makgill family emigrated to New Zealand in 1881 and settled at Waiuku, south of Auckland, where John Makgill took up farming. Robert was educated at a country school near Waiuku, then at Auckland College and Grammar School. As a youth he was a keen yachtsman and won several trophies. He studied medicine at the University of Edinburgh, graduating MB, CM in 1893 with first-class honours. Returning to New Zealand, he was resident surgeon at Auckland Hospital from 1894 to 1896 and honorary bacteriologist in 1897. He went back to Edinburgh to gain his MD in 1899, and completed the diploma in public health from Cambridge University in 1901. By then he had been to South Africa as a civil surgeon attached to the 2nd Battalion of the Gordon Highlanders, and served with the Natal Field Force, for which he was awarded the Queen's South Africa Medal with two clasps.
After returning to Auckland Makgill was district health officer between 1901 and 1904, the first appointed for Auckland under the 1900 Public Health Act. His reports set a high standard for the new Department of Public Health, and were described as 'masterly' by Andrew Balfour and H. H. Scott in their 1924 survey of health problems in the British Empire. In 1902 Makgill reported on a case of bubonic plague in Auckland, with a detailed description of the pathology. His report as district health officer for that year included graphs and tables, with a comprehensive assessment of public health problems in Auckland city and country districts. Makgill's outstanding ability gained him further appointments: as government bacteriologist in Wellington (1904–8), and then as government pathologist (1908–14), and from 1909 as district health officer in Auckland.
A major part of Makgill's work as a district health officer was the testing and improvement of town water supplies. In Auckland in 1914 he investigated a typhoid epidemic; his scrupulous testing and quarantine methods finally traced the infection to a single carrier in a temporary army camp on One Tree Hill. Ironically, one of his nieces, Barbara Makgill, was among the first reported cases, all of which were marked by red flags on a map of the city; after the epidemic he gave Barbara her flag as a souvenir.
After the onset of the First World War in 1914, Makgill was attached to the Royal Army Medical Corps as a temporary captain and in 1915 and 1916 served in the Egyptian Expeditionary Force, rising to the rank of lieutenant colonel. He was made a CBE, but later told his family that the decoration was 'for camel dung and sand': observing that the sand in the camel lines when mixed with camel dung set hard like concrete, he had ordered that the mixture be used for road paving, thereby greatly improving transport and communications.
In 1916 Makgill returned to New Zealand as assistant director of medical services (sanitation) and reported on the outbreaks of pneumonia and meningitis in the military camps at Trentham and Featherston. During the 1918 influenza epidemic he was recalled from the Defence Department when key health officers fell ill, and was largely responsible for dealing with the later phase of the crisis in the Wellington district. While Dr T. H. A. Valintine took leave in 1919–20, Makgill was acting chief health officer, and remained in the Health Department as a senior consultant until his retirement in 1932.
Although not contributing much to the medical journals, Makgill wrote extensively for the annual reports and other Health Department publications. His report on the 1918 influenza epidemic in New Zealand was a model of careful statistical investigation; it argued against the popular belief that the infection had been introduced solely by the Niagara. The crowning achievement of his career as a public health administrator was his expert drafting of the 1920 Health Act, which established the framework of New Zealand's public health system for the next 40 years. He was also involved in drafting the 1925 Nurses and Midwives Registration Act and drafted most of New Zealand's food and drug regulations in the 1920s.
Makgill owned an orchard near Henderson, where his mother lived until her death in 1920, and where he experimented with unusual fruits and vegetables. His best success was with Chinese gooseberries (now better known as kiwifruit). After retiring from the Health Department Makgill regularly visited the United Kingdom, signing on as a ship's doctor on cargo vessels for a nominal salary of one shilling. He stayed with his Haldane relatives at Oxford, where he joined with his uncle, the physiologist Professor Sir John Scott Haldane, in experiments in respiration and the treatment of burns. Barbara Makgill recalls that their arms were 'a mass of scars' from self-inflicted burns as they tried to find the most effective treatment for miners burnt by firedamp (methane) given off by coal. Although he never married, Makgill's keen sense of humour made him a favourite with his nieces and nephews. A stroke partially paralysed his right side not long before he died in Auckland on 3 October 1946, but did not affect his mind.
Robert Makgill deserves to be remembered alongside J. M. Mason, T. H. A. Valintine and J. P. Frengley as one of the architects of New Zealand's public health system in the twentieth century. In almost 30 years in the Health Department he occupied at one time or another all of the senior posts, and his knowledge of New Zealand's public health system was unequalled.