The Flying Scotsman tells the story of Graeme Obree (Miller), a cyclist who at one point in his life contemplated suicide. The film begins with Obree cycling into a wood with the intention of hanging himself. However, a flashback to Obree's childhood reveals the traumatic experiences of being bullied, which had a lasting impact on his mental health.
As a child, Obree found solace in cycling, using his bike to escape from his tormentors. As an adult, he is married with a child, running a failing cycle shop and working as a courier to make ends meet. It is during this time that he meets Baxter (Cox), a boatyard owner who becomes his friend and encourages him to pursue his dream of beating the hour record.
Despite lacking the necessary funding and equipment, Obree is determined to achieve his goal. He designs a revolutionary bicycle named 'Old Faithful' using scrap metal and parts from a washing machine. With the help of his friend Malky McGovern (Boyd), Obree attempts to break the world record in Norway.
After initially failing, Obree tries again and successfully beats the hour record. However, his victory is short-lived as his record is broken by Chris Boardman shortly after. The cycling authorities then change the rules to prevent Obree from using his innovative methods.
Obree's struggles with depression worsen as he faces setbacks in his career. After a failed attempt to defend his title, he spirals into a deep depression and attempts suicide. Fortunately, the rope snaps, and with the support of his wife Anne (Fraser) and Baxter, Obree seeks help for his mental health.
With treatment and support, Obree eventually regains his world title, showcasing his resilience and determination in the face of adversity.