His Majesty's Solicitor General for Scotland () is one of the Law Officers of the Crown, and the deputy of the Lord Advocate, whose duty is to advise the Scottish Government on Scots Law.  They are also responsible for the Crown Office and Procurator Fiscal Service which together constitute the Criminal Prosecution Service in Scotland.

Until 1999, when the Scottish Parliament and Scottish Executive were created, the Lord Advocate and the Solicitor General for Scotland advised Her Majesty's Government. Since their transfer to the Scottish Government, the British Government has been advised on Scots Law by the Advocate General for Scotland.

The current Solicitor General is Ruth Charteris KC, who is the deputy to the Lord Advocate, Dorothy Bain KC since June 2021. This is the first time in history both offices have been filled by two women.

List of Solicitors General for Scotland
List from 1696. Until 1764, the office was at times held jointly.

Pre-Union
1696–1700: Sir Patrick Hume
1701–1706: Sir David Dalrymple of Hailes
1701–1709: William Carmichael

Post-Union

1709–1714: Thomas Kennedy* & Sir James Steuart, Bt.
1714–1716: John Carnegie of Boyseck
1714–1717: Sir James Steuart, Bt.
1717–1720: Robert Dundas, the elder*
1720–1721: Walter Stewart
1721–1733: John Sinclair
1721–1725: Charles Binning
1725–1737: Charles Erskine*
1737: William Grant of Prestongrange*
1742: Robert Dundas, the younger*
1746: Patrick Haldane of Gleneagles & Alexander Hume
1755: Andrew Pringle of Alemore
1759: Thomas Miller*
1760: James Montgomery* & Francis Garden
1764: James Montgomery*
1766: Henry Dundas*
1775: Alexander Murray
1783: Ilay Campbell* & Alexander Wight
1784: Robert Dundas*
1789: Robert Blair
1806: John Clerk
1807: David Boyle
1811: David Monypenny
1813: Alexander Maconochie*
1816: James Wedderburn
1822: John Hope
1830: Henry Cockburn
1834: Andrew Skene
1834: Duncan McNeill*
1835: John Cunninghame
1837: Andrew Rutherfurd*
1839: James Ivory
1840: Thomas Maitland
1841: Duncan McNeill*
1842: Adam Anderson*
1846: Thomas Maitland
1850: James Moncreiff*
1851: John Cowan
1851: George Deas
1852: John Inglis*
1852: Charles Neaves
1853: Robert Handyside
1853: James Craufurd
1855: Thomas Mackenzie
1855: Edward Maitland
1858: Charles Baillie*
1858: David Mure*
1859: George Patton*
1859: Edward Maitland
1862: George Young*
1866: Edward Strathearn Gordon*
1867: John Millar
1868: George Young*
1869: Andrew Rutherfurd-Clark
1874: John Millar
1874: William Watson*
1876: John Macdonald*
1880: John Balfour*
1881: Alexander Asher
1885: James Robertson*
1886: Alexander Asher
1886: James Robertson*
1888: Moir Tod Stormonth Darling
1890: Sir Charles Pearson*
1891: Andrew Murray*
1892: Alexander Asher
1894: Thomas Shaw*
1895: Andrew Murray*
1896: Charles Dickson*
1903: David Dundas
1905: Edward Theodore Salvesen
October 1905: James Avon Clyde*
December 1905: Alexander Ure*
February 1909: Arthur Dewar
April 1910: William Hunter
December 1911: Andrew Anderson
October 1913: Thomas Brash Morison*
1920: Charles David Murray*
March 1922 – July 1922: Andrew Constable
July 1922 – November 1922: William Watson*
November 1922: David Fleming
April 1923: Frederick Thomson
February 1924: John Charles Fenton
November 1924: David Fleming
1925: Alexander Munro MacRobert*
1929: Wilfrid Normand*
1929: John Charles Watson
1931: Wilfrid Normand*
1933: Douglas Jamieson*
1935: Thomas Mackay Cooper
1935: Albert Russell
1936: James Reid
1941: Sir David King Murray
1945: Daniel Blades
1947: John Wheatley*
1947: Douglas Johnston
1951: William Rankine Milligan*
1955: William Grant*
1960: David Anderson
1964: Norman Wylie* (April to October)
1964: James Graham Leechman
1965: Henry Wilson*
1967: Ewan George Francis Stewart
1970: David William Robert Brand
1972: William Stewart
1974: Lord McCluskey
1979: Nicholas Fairbairn
1982: Peter Fraser*
1989: Alan Rodger*
1992: Thomas Dawson
1995: Donald Mackay*
1995: Paul Cullen
1997: Colin Boyd*
2000: Neil Davidson
2001: Elish Angiolini*
2006: John Beckett
2007: Frank Mulholland*
2011: Lesley Thomson
2016: Alison Di Rollo
2021: Ruth Charteris

* = served later as Lord Advocate

Sources
Most of the above list is taken from Haydn's Book of Dignities, 12th edition (1894, reprinted 1969) and from Oxford Companion to Law, Clarendon Press, 1980.

References

External links
 Solicitor General on the Scottish Government website
 Law officers on the Scottish Parliament website

 
Ministerial posts of the Scottish Government
Scots law formal titles
Lists of government ministers of Scotland
Lists of government ministers of the United Kingdom
 Solicitor General
Law Officers of the Crown in the United Kingdom
Lists of political office-holders in Scotland