Lord Hamilton has been a judge of the Qatar International Court since 2015. Lord Hamilton was admitted to the Faculty of Advocates in 1968 and appointed Queens Counsel (QC) in 1982. He was an Advocate Depute, a Scottish prosecutor from 1982 until 1985, Chairman of the Medical Appeals Tribunals from 1988 to 1992, and President of the Pensions Appeal Tribunal in Scotland from 1992 to 1995. Over several months in 1992 to 1993, he acted as a temporary Sheriff Principal in the sheriffdom of Tayside, Central and Fife, due to the indisposition of the incumbent Sheriff Principal.
From 1988 to 1995, he was a Judge of the Courts of Appeal of Jersey and Guernsey.
In 1995, Lord Hamilton was appointed a Senator of the College of Justice. Between 1997 and 2000, he was a full-time commercial judge dedicated to commercial business and responsible for oversight of that aspect of Court of Session business. In January 2002, he was appointed as a Judge of the Inner House of the Court of Session, where he sat principally on appellate business. In 2005, the Scottish Executive announced that he would succeed Lord Cullen as Lord Justice General and Lord President of the Court of Session, upon the latter's appointment to the Appellate Committee of the House of Lords. As Lord President and Lord Justice General, he was responsible for the supervision of these Courts and for the determination of policy and rules of court procedure. He also made appointments to some tribunals and made recommendations to The Queen for the appointment of Queen’s Counsel.