The Sheriff of Elgin was historically the royal official responsible for enforcing law and order in Elgin, Scotland.  Prior to 1748 most sheriffdoms were held on a hereditary basis. From that date, following the Jacobite uprising of 1745, they were replaced by salaried sheriff-deputes, qualified advocates who were members of the Scottish Bar.

After a merger the sheriff became the Sheriff of Elgin and Nairn in 1747. After further mergers the sheriffdom became part of the sheriffdom of Banff, Elgin & Nairn in 1854, part of the sheriffdom of Inverness, Elgin & Nairn in 1882 and part of the sheriffdom of Inverness, Moray, Nairn & Ross & Cromarty in 1946.

Sheriffs of Elgin

Alexander Douglas (1226-1235)
Thomas Wiseman (1237-1249)
Alexander de Montfort (1261)
Reginald le Chen (1291-1297)
Willam Wiseman (1304-1305)
William de Strathbok (1337)
William de Valognes (1362)
Alexander Dunbar of Westfield (1446)
Alexander Dunbar (1470)
James Dunbar of Cumnock (c. 1497)

Sheriffs-Depute of Elgin and Nairn (1747)
Sir George Abercromby, 4th Baronet, 1783–>1822
Robert Cunningham Graham Spiers, 1835-1840  (Sheriff of Edinburgh, 1840–1847)
Cosmo Innes, 1840–1852
Benjamin Robert Bell, –1854 (Sheriff of Banff, Elgin and Nairn, 1854)

Sheriffdom merged in 1854 to form the sheriffdom of Banff, Elgin and Nairn

See also
 Historical development of Scottish sheriffdoms

References

Taylor, Alice; The Shape of the State in Medieval Scotland, 1124-1290 (2016).

Moray