Richard Keen QC is stepping down from his position as chairman of the Scottish Conservative Party to become the new Advocate General for Scotland.
He was previously dean of the Faculty of Advocates.
Mr Keen said it would be a "great honour" to support the UK government at a "crucial point" as new legislation brings further devolution to Holyrood.
He said: "I am delighted to be appointed Advocate General for Scotland.
"It is a great honour to join the UK government and I look forward to working with my ministerial colleagues to support the work of the UK government in Scotland at this crucial point in our political and constitutional history."
Mr Keen is one of the most prominent figures in Scottish legal circles. He stood down from his role at the Faculty of Advocates to become the chairman of the Scottish Conservatives.
Scottish Secretary David Mundell said: "This is a key job for Scotland and Richard is exactly the right person to take it on.
"He is one of our most respected and experienced legal minds, and will have a central role in supporting the UK government in Scotland, not least as we work to strengthen devolution to the Scottish Parliament."
One of Scotland's leading lawyers has been appointed as the UK government's most senior adviser on Scots law.