Robert Lee was born at Grantham, Lincolnshire, England, where he was baptised on 1 July 1837. He was the son of Ann Hatfield and her husband, John Lee, a hatter and furrier. Robert was educated at the Grantham national school, where he was apprenticed as a pupil-teacher for four years. In 1854 a Queen's scholarship took him to St Mark's College, Chelsea, whose principal was Derwent Coleridge, son of the poet Samuel Taylor Coleridge. St Mark's specialised in preparing teachers for rural parishes. At the end of the two-year course Lee was offered a third year of advanced tuition, and for the next two years was a resident master of the college.
From 1859 to 1863 Lee was headmaster of All Saints Boys' School, Preston, Lancashire. He was then appointed, on Derwent Coleridge's recommendation, to the headmastership of the Bishop's School in Nelson, New Zealand. He served in this small denominational school for sons of the better-off settlers from early 1864 to the end of 1873. On 29 October 1870, at Christ Church in Nelson, he married Fanny Thompson Gully, the daughter of the artist John Gully. While teaching at the Bishop's School Lee had ample opportunity to observe the Nelson provincial school system. Its common school tradition, direction by a strong central board working with local committees, and reliable income enshrined in statute was to provide the model for the 1877 legislation which established a national education system.
On 1 January 1874 Lee became inspector and organising master for the newly created Education Board of the Province of Wellington. He found a ramshackle school system, the result of provincial poverty and 20 years of neglect, in which annual local meetings of householders had made the main schooling decisions. Lee assisted the board in creating a Nelson type of system. His initial inspection showed that many of the teachers, who until recently had been receiving less than a labourer's wage, had turned to teaching after failing in other callings. Working in poorly housed, inadequately equipped schools, untrained in teaching method and with confused ideas about the curriculum, they were attracting very poor attendances.
In April 1874 the board accepted Lee's solution to the curriculum confusion, adopting a system of standards by which schools could be organised and scholars examined and classified annually by the inspector. This was the first adaptation to New Zealand conditions of the British 'payment by results' code of 1862. Under Lee's scheme examination results did not decide a school's income (as was the case in Britain), but rather the teachers' rights to continued employment and promotion. Lee developed teacher recruitment and training policies, salary scales and staffing schedules, and vigorously guided the board in such matters as school architecture, classroom furniture and textbooks. As organising master he worked alongside the teachers, demonstrating classroom and timetable arrangements and teaching methods. Despite his already wide responsibilities, he also became inspector for the Marlborough education board and for South Taranaki's Patea education board, until abolition of the provincial boards in 1878. Thus his standards and other educational improvements were introduced from Hawera to Kaikoura.
After the passing of the 1877 Education Act, Lee became inspector and secretary for the new Wellington board, with a reduced district. In 1874–75 Lee had tussled with the board to establish that he was the expert on professional matters; his joint appointment as secretary and inspector indicates how fully he had won their confidence. For about 20 years he was the district's dominant educational force. He decided each child's progress through the standards, shaped the teachers' careers, and by his advice on curriculum, teaching methods and equipment largely determined the quality of the school experience. He had a reputation for being forthright but fair. Occasionally he erred: for a time he was criticising teachers openly before their pupils, until sharp public rebuke brought him into line.
Lee used his power most notably in removing poorly performing teachers. The most outstanding case – with long-term consequences for Lee himself – was the dismissal in 1884 of John Young after nine years' service as founding headmaster of the Terrace School, Wellington. Lee decided that Young and his daughter, who was also on the staff, were responsible for persistently poor examination results. Over opposition from many parents and one board member, Lee carried through the dismissal. Young was successful at the next election for the board, and began a campaign to trim Lee's powers.
Lee's dominance was also being eroded by the growth of the system. His term as board secretary had ended in 1882, and in 1890 he was joined by an assistant inspector. Young's first big victory came in 1898 when Lee requested a third inspector. Young and his supporters viewed this as a case of an ageing public servant asking to be pensioned off. The third inspector was granted, but Lee's salary was reduced, and the inspectors were instructed to keep strict office hours and to submit monthly reports. Lee appears to have flouted these rules. His annual reports began indicating sorry consequences of the board's shunning its inspectors' expert advice.
Affairs moved to a crisis in 1901. Board resentment at strong criticism of its administration in Lee's annual report of the previous year was exacerbated when the royal commission on school staffs and salaries, chaired by board member A. W. Hogg, was told by Lee that the schools were suffering from bad appointments made without the inspectors' advice. Lee's retirement was carried by a majority of one. There was a widespread outcry from school committees, teachers and the press. Forced to go directly to the public, Lee provided specific examples of bad appointments, nepotism and waste, including a school built where there were no pupils. The board stuck to its decision, but the teachers rallied to give Lee a rousing farewell.
The public was soon able to make its verdict clear. Three months after his retirement Lee topped the poll in an election to fill a board vacancy, while Young lost his seat when he next contested it. In August 1904 Lee was elected board chairman, and provided able and active leadership until his retirement in 1914.
Robert Lee provided one of the strongest links between the British educational tradition and the emerging New Zealand school system. He kept well abreast of British thought and practice, visiting Britain in 1887 and 1905–6 to see the latest educational developments. He served on various public bodies, including the Wellington College board of governors and the Victoria College council. He died at his home in Lower Hutt on 18 June 1922, survived by Fanny Thompson Lee and nine children.