Harvie attended Dumbarton Academy between 1984 and 1991. He then studied at Manchester Metropolitan University where he was briefly a member of the Labour party. From 1997 till his election in 2003, Harvie worked within the Gay Men's Project at the sexual health organisation PHACE Scotland initially as a youth worker and later as Development Worker for the Lanarkshire Health Board area. Although this work was principally concerned with HIV prevention, it also involved Harvie in equality campaigning. He also had a spell as a civil servant, working with the Inland Revenue in Dumbarton. During this period, he was active in the campaign to repeal Section 2A of the Local Government Act, more commonly known as Section 28. This campaign was successful, and Harvie has stated that the experience prompted him to become more actively involved in politics, leading to his joining the Scottish Green Party.
Harvie was elected as MSP for the Glasgow region at the 2003 Scottish Parliament election. He gained attention both for issues strongly associated with the Greens, such as campaigning against the extension to the M74 motorway in Glasgow, and for more 'mainstream' issues such as opposition to the Identity Cards Bill. Quickly after becoming an MSP he caused some controversy by proposing civil partnership legislation in the Scottish Parliament. Though this legislation was ultimately handled at Westminster and covered the whole UK, the distinctive Scottish proposals helped to stimulate some public debate north of the border, both on the issue of same-sex relationships and on the process known as a Legislative Consent Motion by which the Scottish Parliament allows Westminster to legislate for the whole UK. Harvie was a member of the Communities Committee of the Scottish Parliament throughout the 2003–07 session and served as Scottish Greens Spokesperson for Justice and Communities from 2003 to 2005 and Spokesperson for Justice, Communities, Europe and Constitutional Affairs from 2005 to 2007. Through his work on the Communities Committee, he worked on the Anti-social behaviour Bill, the Charities Bill and the Housing Bill, as well as on issues of homelessness, debt, the planning system and building standards. In 2004 Harvie was given the 'One to Watch' award at the annual Scottish Politician of the Year event. In addition to the Communities portfolio, Harvie covered the Justice portfolio for the Greens, and has been active on a number of civil liberties issues. He has also been convener of the Cross Party Group on Human Rights, and helped to establish a CPG on Sexual Health. Following the Green Party's disappointing performance in the 2007 election, Harvie was returned with a reduced share of the vote. The tight parliamentary arithmetic and a constructive relationship with the Scottish National Party led to a Co-operation Agreement between the two parties. Under this, Harvie was elected to be convene the Transport, Infrastructure and Climate Change Committee, an office he held until 2011. He became the male co-convenor of the Scottish Greens on 22 September 2008 after being the only person to stand for the position. Re-elected in 2016, Harvie joined the Finance and Constitution Committee and became Scottish Greens Spokesperson for Finance, Economy, Fair Work and Equalities. After changes to their constitution, Harvie was elected co-leader of Scottish Greens in a 2019 co-leadership election.