Campbell was first elected to the Scottish Parliament on 3 May 2007 as a list member for the South of Scotland region. At 26 years and 351 days on her election, she was the youngest MSP elected to serve in Parliament in the 2007–2011 session, followed by her SNP colleague Jamie Hepburn in second place. She was formerly Minister for Local Government and Planning May 2011−December 2011, then Minister for Children and Young People December 2011−May 2016 and Minister for Public Health and Sport from May 2016 to June 2018. In December 2014, Campbell became the first person to take maternity leave while serving as a Minister of the Scottish Government.