MacAskill studied law at the University of Edinburgh and worked as a solicitor and was a senior partner in an Edinburgh law firm, before being elected to the Scottish Parliament in 1999. He was a long-standing member of the SNP's National Executive Committee and has served as National Treasurer and Vice Convener of Policy. He was convener of the Scottish Parliament Subordinate Legislation Committee (1999–2001), and served in the SNP Shadow Cabinet as Shadow Minister for Enterprise and Lifelong Learning (2001–2003), Shadow Minister for Transport and Telecommunications (2003–2004) and Shadow Minister for Justice (2004–2007).