Nasmyth was born in Edinburgh on 9 September 1758. He studied at the Royal High School and the Trustees’ Academy and was apprenticed to a coachbuilder. Aged sixteen, he was taken to London by portrait painter Allan Ramsay where he worked on subordinate parts of Ramsay's works. Nasmyth returned to Edinburgh in 1778, where he worked as a portrait painter. Offered a loan by Patrick Miller of Dalswinton, Nasmyth left in 1782 for Italy, where he remained two years furthering his studies.
Robert Burns, 1787.Nasmyth returned to Scotland, painting several important portraits. His portrait of Robert Burns is now in the Scottish National Gallery. He also painted a family portrait featuring George Farquhar Kinloch, Laird of Kair in Kinkerdinshire, circa 1784. Nasmyth’s strong Liberal opinions offended many of his aristocratic patrons in a politically charged Edinburgh, leading to a drop in work. Therefore Nasmyth turned to landscape work and occasional scene-painting for theatres.
Nasmyth was also largely employed by noblemen throughout the country in the improving and beautifying of their estates, in which his fine taste rendered him especially skilful. He gained some reputation as an architect, having designed the graceful circular temple covering St Bernard's Well by the Water of Leith (1789), as well as bridges at Almondell, West Lothian, and Tongland, Kirkcudbrightshire.
Nasmyth also taught painting outside his own family and "instilled a whole generation with the importance of drawing as a tool of empirical investigation"; it was probably from him that John James Ruskin (father of John Ruskin) learned to paint as a schoolboy in Edinburgh in the later 1790s. Another of Alexander's successful pupils was Andrew Wilson, painter, teacher, art dealer and connoisseur, who had his first art training under Nasmyth.
He died in Edinburgh and is buried in St Cuthbert's Churchyard at the west end of Princes Street.