The son of Alexander Shaw of Dunfermline, Fife, Craigmyle was educated at the Dunfermline High School and at Edinburgh University. He was appointed an advocate in 1875 and became a Queen's Counsel in 1894. He gained an LLD from St Andrews University in October 1902 and from the University of Aberdeen in 1906 and was also Hamilton Fellow in Mental Philosophy at Edinburgh University.
Craigmyle sat as Member of Parliament (MP) for Hawick Burghs from 1892 to 1909 and served as Solicitor General for Scotland from 1894 to 1895 and as Lord Advocate from December 1905 to 1909. He resigned from parliament and ministerial office and was created a life peer as Baron Shaw, of Dunfermline in the County of Fife, on 20 February 1909, so that he could sit in the House of Lords and serve as a Lord of Appeal in Ordinary. He retired from this office in 1929 and was made an hereditary peer as Baron Craigmyle, of Craigmyle in the County of Aberdeen, on 7 Mar 1929.
- Fry, M. (5 February 1987). Patronage and Principle: A Political History of Modern Scotland. Aberdeen University Press. ISBN 9780080350639.
- "University intelligence". The Times. No. 36906. London. 23 October 1902. p. 9.
- Craig, F. W. S. (1989) . British parliamentary election results 1885–1918 (2nd ed.). Chichester: Parliamentary Research Services. p. 511. ISBN 0-900178-27-2.
- "No. 27864". The London Gazette. 15 December 1905. p. 9008.
- "No. 28238". The London Gazette. 2 April 1909. p. 2589.
- "No. 33493". The London Gazette. 10 May 1929. p. 3124.
- "SHAW, Rt. Hon. Thomas". Who's Who. Vol. 59. 1907. p. 1591.
- Debrett's Peerage. 1921.
- Kidd, Charles, Williamson, David (editors). Debrett's Peerage and Baronetage (1990 edition). New York: St Martin's Press, 1990,[page needed]
- Works by or about Thomas Shaw, 1st Baron Craigmyle at Internet Archive
- Works by or about Thomas Shaw, 1st Baron Craigmyle at Wikisource
- Hansard 1803–2005: contributions in Parliament by Thomas Shaw