[1] In May 1938, he appointed as Chairman of the Scottish Land Court, succeeding the late Lord MacGregor Mitchell.
[13][14] On his appointment, The Scotsman newspaper noted that the new judge had "taken a prominent part in political work for the Unionist Party".
[15] He took the judicial title Lord Murray, and chaired the court until June 1941, when he joined the wartime coalition government as Solicitor General for Scotland.
[16] He dropped the judicial title Lord Murray,[17] and was knighted in the King's Birthday Honours.
He was Solicitor General for Scotland from 1941 to 1945, and was elected at a closely fought by-election in 1943 as the Unionist Member of Parliament (MP) for Midlothian and Peebles North.