Major-General Lachlan Macquarie CB ( 31 January 1762 â `` 1 July 1824 ) was a British military officer who was the fifth Governor of New South Wales from 1810 to 1821 . Major-General Lachlan Macquarie CB ( 31 January 1762 â `` 1 July 1824 ; Scottish Gaelic spelling : Lachlann MacGuaire ) , was a British military officer and colonial administrator . He served as the last autocratic Governor of New South Wales , Australia from 1810 to 1821 and had a leading role in the social , economic and architectural development of the colony .