John Robertson was born at Outram, Otago, New Zealand, on 18 July 1870, the son of Joseph Robertson, a storekeeper, and his wife, Jessie Borrie. He was educated at Kaitangata and Stirling schools, and was a pupil-teacher at the former for four years from 1886 before taking a one-year course at the Dunedin Training College. After studying at Otago University in the early 1890s he was appointed head teacher at Ngapara School in 1894. On 22 December 1896 he married his cousin, Helen Borrie, at Papakaio.
Robertson gained a BA in 1897 and a BSc in 1904. After teaching at Kaikorai School from 1906 to 1909 and at Lawrence District High School in 1910, where he was head teacher, Robertson was appointed inspector of schools in Otago in February 1911.
About this time Robertson acquired an avid interest in mountain-climbing. Described as 'tall, rangy, athletic and nimble witted', he was a member of a three-man climbing team that made several notable ascents, including the first of Turret Peak in December 1912. He always considered his greatest climb to be the first ascent of the west peak of Mt Earnslaw, on 7 February 1914.
Robertson had served in the Volunteer Force for three years and as secretary of the Ngapara Defence Rifle Club, and he was determined to take part in the First World War. In May 1916, at the age of 45, he enlisted in the New Zealand Expeditionary Force, giving his age as 39. After training at Featherston, he left with a reinforcement draft for the Middle East, arriving at Suez in January 1917. He was posted as a trooper to the Imperial Camel Corps, a cosmopolitan formation of British, Australian, Indian and New Zealand troops. From April 1917 until June 1918 Robertson was one of 350 New Zealanders who formed two companies of cameleers. He participated in the corps's operations in the Sinai desert, but in May 1918 was sent back to a rest camp at Port Said for medical treatment.
By the time he returned to duty in July, the Imperial Camel Corps had been reorganised as a light horse brigade, and the New Zealanders were formed as machine-gun squadrons. It was on horseback, therefore, that he took part in General E. H. H. Allenby's victorious drive north in September–October 1918, which culminated in the capture of Damascus and the Turkish surrender on 31 October. For Robertson, the campaign's hardships – the heat, flies, disease, lack of water – were more than compensated for by the opportunity it afforded to explore the lands of antiquity. His enthusiasm for service in this theatre was evident in his account of the corps's efforts, With the cameliers in Palestine, published in 1938.
Following the armistice with Turkey, Robertson was given responsibility for organising educational classes for the machine-gunners at Ismâ'ilîya, where they were deployed late in 1918. Before long his duties were extended to cover the whole NZEF in Egypt. The programme Robertson set up was mostly vocational, aimed at preparing the men for civilian life. Sixteen classes were offered, of which economics, civics and hygiene were compulsory; motor mechanics and various agricultural subjects were the most popular. The lack of facilities meant that lectures were usually held outdoors. Robertson was appointed assistant director of education at headquarters in December 1918, a position he held until he embarked for New Zealand on 30 June 1919. His promotion from trooper to temporary major was probably unprecedented in the NZEF. During his repatriation he was education officer on the troopship Ulimaroa, which arrived in New Zealand on 10 August 1919.
After his discharge, Robertson resumed his career as a school inspector with the Department of Education. He was successively senior inspector of schools in Southland (1927–28), Hawke's Bay (1929) and Auckland (1930–32). He retired on 14 April 1932 and returned to Dunedin. There he was a member of the Council of the University of Otago and the Otago Boys' and Girls' High Schools Board. He was also involved in the University Club and the Otago section of the New Zealand Alpine Club, presiding over both for a term. John Robertson died at Dunedin on 20 September 1954. His wife, Helen, had died in 1946. There appear to have been no children of the marriage.