He was elected to the Scottish Parliament in 2003 aged 29, making him the youngest constituency MSP at the time. He was the Scottish Liberal Democrat Finance Spokesman and then moved on to become Justice and Home Affairs spokesman. He was re-elected in 2007 following a close campaign, with some of the media stating that the Scottish National Party candidate Christine Grahame would defeat him. Ultimately, both parties greatly increased their vote shares at the expense of the Conservatives and Labour. Purvis's margin declined by 0.2 percentage points but increased by 65 votes; this discrepancy was due to a vast increase in turnout in the 2007 election. He was subsequently defeated by Grahame in the 2011 election.