At a London music hall theatre, Richard Hannay (Robert Donat) is watching a demonstration of the superlative powers of recall of “Mr. Memory” (Wylie Watson) when shots are fired. In the ensuing panic, Hannay finds himself holding a seemingly frightened Annabella Smith (Lucie Mannheim), who talks him into taking her back to his flat. There, she tells him that she is a spy, being chased by assassins, and that she has uncovered a plot to steal vital British military information, masterminded by a man with the top joint missing from one of his fingers. She mentions “The 39 Steps”, but does not explain their meaning.
Later that night, Smith, fatally stabbed, bursts into Hannay’s bedroom and warns him to flee. He finds a map of the Scottish Highlands clutched in her hand, showing the area around Killin, with a house or farm named “Alt-na-Shellach” circled. He sneaks out of his flat disguised as a milkman to avoid the assassins waiting outside. He then boards the Flying Scotsman express train to Scotland. He learns from a newspaper article, read by a pair of women’s undergarment salesmen, that he is the target of a nationwide manhunt for Smith’s murder. When he sees the police searching the train, he enters a compartment and kisses the sole occupant, Pamela (Madeleine Carroll), in a desperate attempt to hide his face and escape detection. She frees herself from his unwanted embrace and alerts the policemen, who stop the train on the Forth Bridge. Hannay then escapes, hiding behind the bridge’s truss.
He walks toward Alt-na-Shellach, staying the night in the house of a poor crofter (farmer) (John Laurie) and his much younger wife (Peggy Ashcroft) The crofter becomes suspicious of sexual attraction between his wife and Hannay, spying on them from an outside window. In fact, Hannay has revealed his current predicament to the young wife and asked for her help. Early the next morning, the young wife sees a police car approaching and warns Hannay. She gives Hannay the crofter’s dark coat so as to better camouflage him. Hannay flees across the moors and at a bridge he finds a sign for Alt-na-Shellach. The police, hot on his trail, fire several shots at him and even employ a Weir autogyro to chase him down. He eventually arrives at the house of the seemingly respectable Professor Jordan (Godfrey Tearle) and is let in by his maid after saying he has been sent by Annabella Smith. The police arrive, but Jordan sends them away and politely listens to Hannay’s story after ushering out all his afternoon guests (including the local sheriff) visiting the house. Hannay relates to Jordan that the man at helm of the group of foreign assassins and spies is missing the top joint of the little finger of his left hand. Jordan corrects him by revealing that it’s actually his right hand with a missing joint, thus he is the head of the foreign spies. Jordan then shoots Hannay as he inches towards the door, and then (apparently) leaves him for dead.
Luckily, the bullet is stopped by a hymn book in the crofter’s coat pocket. This is revealed by Hannay in his office of the local sheriff, who had earlier been a guest of Professor Jordan. More police arrive when the sheriff reveals that he does not believe the fugitive’s story, since Professor Jordan is his best friend. The police move to arrest Hannay, handcuffing his right wrist, but he jumps through a window and escapes by joining a Salvation Army march through the town. He tries to hide at a political meeting and is mistaken for the introductory speaker. He gives a rousing impromptu speech—without knowing anything about the candidate he is introducing—but is recognized by Pamela, who gives him away to the police once more. He is taken away by “policemen” who ask Pamela to accompany them. They drive past the police station, claiming they have orders to go directly to Inveraray, but Hannay realizes they are agents of the conspiracy when they take the wrong road. When the men get out to disperse a flock of sheep blocking the road, Hannay escapes, dragging the unwilling Pamela along, as they have been handcuffed together.
They make their way across the countryside and stay the night at an inn. While he sleeps, Pamela manages to slip out of the handcuffs, but then overhears one of the fake policemen on the telephone, confirming Hannay’s assertions. She returns to the room and sleeps on a sofa. The next morning, she tells him what she heard. He sends her to London to alert the police. No secret documents have been reported missing, however, so they do not believe her. Instead, they follow her.
Pamela leads them to the London Palladium. When Mr. Memory is introduced, Hannay, sitting in the audience, recognizes his theme music — the annoyingly catchy tune he has been unable to forget and whistling for days. Hannay, upon recognizing Professor Jordan and witnessing him signal Mr. Memory, realizes that the spies are using Mr. Memory to smuggle the Air Ministry secret out of the country. As the police take Hannay into custody, he shouts, “What are The 39 Steps?” Mr. Memory compulsively answers, “The 39 Steps is an organisation of spies, collecting information on behalf of the Foreign Office of …” at which point Jordan shoots him and jumps to the theatre’s stage in an attempt to flee, but is apprehended. The dying Mr. Memory recites the information stored in his brain: the design for a silent aircraft engine, and is then able to pass away peacefully, saying “I’m glad it’s off my mind.”
Hannay and Pamela witness Memory’s death as their clasped hands are shown from behind, Hannay’s handcuffs clearly visible. As they stand together at the side of the stage, their hands begin to touch. Now hand in hand, they watch as the hurriedly ushered-on chorus line dances to an orchestrated version of the Jessie Matthews song “Tinkle Tinkle Tinkle”, while the image fades to black.