Heroin addicts Mark Renton and Daniel "Spud" Murphy are running down Edinburgh's Princes Street pursued by store security guards. Renton's circle of friends are introduced: amoral con artist Simon "Sick Boy" Williamson (also an addict), simple-minded, good-natured Daniel "Spud" Murphy, clean-cut athlete Tommy MacKenzie, and psychopath Francis "Franco" Begbie, who picks extremely violent fights with people who get in his way.
Renton decides to quit heroin and buys opium rectal suppositories from dealer Mikey Forrester to ease the transition. After this final hit (and a violent spell of diarrhea caused by cessation of heroin) he locks himself into a cheap hotel room to endure withdrawal. He later goes with his friends to a club, finding that his sex drive has returned, and eventually leaves with a young woman named Diane. In the morning, he realises that Diane is a fifteen-year-old schoolgirl and that her "flatmates" are actually her parents. Horrified, Renton tries to shake the incident, but is forced to remain in touch after Diane blackmails him.
Sick Boy, Spud and Renton start using heroin again. Tommy, whose girlfriend dumped him after a chain of events initiated by Renton, begins using as well. One day the group's heroin-induced stupor is violently interrupted when Allison, their friend and fellow addict, discovers that her infant daughter Dawn has died from neglect without any of the group noticing. All are horrified, especially Sick Boy, who is implied to have secretly been Dawn's father.
Renton and Spud are caught stealing from a bookshop and arrested. Spud goes to prison, but Renton avoids punishment by entering a Drug Interventions Programme, where he is given methadone. Despite support from his family, Renton is desperate for a more substantial high and escapes to his drug dealer's flat, where he nearly dies of an overdose. Renton's parents take him home and lock him in his old bedroom to force him through withdrawal. As Renton goes through severe withdrawal symptoms, he has nightmares of Diane singing on the bed, his friends giving him advice, Allison's dead baby crawling on the ceiling, and an imagined TV game show in which host Dale Winton asks Renton's parents questions about HIV.
Renton is finally roused from his nightmares and hallucinations by his parents, who tell him he needs to get tested. Despite years of sharing syringes with other addicts, Renton tests negative. Bored and depressed, he visits Tommy, who has succumbed to addiction and is now severely ill and HIV-positive. Renton moves to London and takes a job as a property letting agent. He begins to enjoy his new life of sobriety and saves up money on the side while corresponding with Diane. However, Begbie, who has committed an armed robbery, and Sick Boy, now a pimp and drug dealer, move into Renton's bedsit unannounced, to Renton's irritation.
In Edinburgh, Tommy dies from HIV-related toxoplasmosis and the three travel back to Scotland for his funeral. They meet Spud, who has been released from prison. Sick Boy suggests a lucrative but dangerous heroin transaction, but needs Renton to supply half of the initial £4,000. Renton injects himself with a sample to test the heroin's purity. The four sell the heroin to a dealer for £16,000. During their celebration at a pub, Renton secretly suggests to Spud that they steal the money, but Spud is too frightened of Begbie to consider it. Renton finally has enough of Begbie after witnessing him glass and then beat a man who accidentally spilt beer on him. Early in the morning as the others sleep, Renton quietly takes the money. Spud sees him leave but does not tell the others. When Begbie awakens, he destroys the hotel room in a violent rampage which attracts the police while Spud and Sick Boy flee. Renton reiterates his hollow vow to live a stable, traditional life, and leaves Spud £2,000.