McNally joined the Scottish National Party in 2000. He first became an elected representative in Falkirk council after winning the Herbertshire by-election in 2005. Until this point, the SNP were unable to make a breakthrough in this area. He stood as a candidate in the Falkirk constituency at the 2010 general election, finishing second behind Labour's Eric Joyce. In 2015, McNally was elected with 34,831 votes, a majority of 19,701 over his nearest rival. These numbers were the largest vote received by any Scottish MP, and the largest majority received by any Scottish MP at the 2015 UK general election, the 93rd largest majority in the UK in 2015, and the highest number of votes polled for any SNP candidate in any election in the history of the party. McNally retained his Falkirk seat at the 2017 general election with a reduced majority of 4,923 votes. At the 2019 general election, McNally retained his Falkirk seat with a much increased majority of 14,948 votes over the second place Conservative candidate. He is now one of 47 SNP MPs sitting in the House of Commons as the third-largest party, after the Conservatives and Labour. On 18 October 2017, McNally attracted media attention when during Prime Minister's Questions he held out a red card in the Chamber while questioning why Scottish Conservative MPDouglass Ross had skipped a debate on Universal Credit to act as an assistant referee in a Champions League football match in Spain. He asked Prime Minister Theresa May, "What signal does she think this sends to hard working members of the public who are expected to turn up for their day job or face sanctions?" May responded that Scottish Conservative MPs had done "more" for the interests of Scotland than the SNP had ever done. He is the SNP Spokesperson for the Environment, and has drawn attention to issues such as unsustainable fishing and proper disposal of recyclable waste. He was one of 114 MPs who voted against the triggering of Article 50. He is a member of the House of Commons of the United KingdomEnvironmental Audit Select Committee. John is the Chair of the Hair All-party Parliamentary Group on the Hair Industry. He is currently campaigning for the introduction of mandatory registration in the Hair industry to combat modern slavery and protect consumers from untrained and unqualified practitioners. He is a member of the All-party Parliamentary Group on Disability, he has consistently campaigned on behalf of Changing Places toilets. He is a supporter of Arthritis Research UK. He signed the TIE pledge to support their call for LGBT-inclusive education.
Personal life
A barber shop owner for over 30 years from Denny, he and his wife Sandra have two children. In 2016 McNally revealed that he had suffered from carbon monoxide poisoning while staying at a rented house in London, and feels that only a "rickety window" had prevented him from dying by ventilating the property. He used the experience to highlight the need for carbon monoxide detectors.