Canadian Richard Hannay (Robert Donat) is at a London music hall. While watching a demonstration of the fabulous powers of recall of "Mr. Memory" (Wylie Watson) shots are fired. In the ensuing panic, a frightened Annabella Smith (Lucie Mannheim) holds on to Hannay and talks him into taking her back to his flat. After the bus ride there, she admits that she is a counterspy, and that she fired the shots to cause confusion because she is being chased by assassins, who are standing outside on the street. She claims to know of a plot to steal vital British military secrets, masterminded by a man with the top joint missing from his little finger. To stop the plot, she needs to go to Scotland to a large house in a small village. She mentions "thirty-nine steps", but does not explain their meaning.
That night, Annabella is stabbed in the back with Hannay's knife, but manages to warn him to flee before dying. She is clutching in her hand a map of Scotland with a tiny village circled. To sneak out of the watched flat he borrows the uniform of a milkman and soon boards a train to Scotland. He sees police searching the train and learns from a newspaper that he is the target of a nationwide manhunt as a murder suspect. To throw police off his track, he enters a compartment and kisses the only occupant, Pamela (Madeleine Carroll), and the searchers skip the compartment. She however frees herself from his unwanted embrace and alerts the policemen. The train stops right at the Forth rail bridge from having the emergency brake triggered and Hannay jumps onto the bridge and escapes. The police mount a huge effort to find him, that include his being chased from an autogyro, a precursor of the helicopter.
He stays the night with a poor crofter (farmer) (John Laurie) and his young wife (Peggy Ashcroft), who realizes Hannay is on the run, but keeps quiet. The next morning, the husband is about to turn him in to a search party but he leaves, aided the wife, wearing the farmer's Sunday coat. He arrives on foot at his target village and calls at a house Annabella had described. A large party is going on, he gives the name Annabella Smith to the maid, and the owner lies to the arriving police so he doesn't get arrested. When he tells his story to the seemingly respectable Professor Jordan (Godfrey Tearle), Jordan reveals that he is missing the top joint of a finger. Jordan shoots Hannay and leaves him for dead, but luckily, the bullet stopped in the farmer's hymnbook, left in a coat pocket.
Hannay drives to the local police after stealing the professor's car, but they refuse to believe his story, since they know Jordan well. He is arrested for the London murder. Hannay breaks through a glass window and mingles with a passing parade. He opens a door, finds himself at a political meeting, and is mistaken for the introductory speaker arriving a bit late. Without knowing a thing about the candidate he is introducing he improvises a rousing speech that becomes truly moving oratory as it picks up momentum. Hannay talks about a world in which no one is unjustly accused, no one is hunted, no nation plots against nation,
He is recognized by Pamela, who alerts police once again. He is handcuffed and taken away by "policemen" in a car. Hannay realizes they are spy agents when they drive past the police station. He proves his theory by looking for a reaction from his captors when he mentions the boss who has a missing joint from his finger. When a flock of sheep blocks the narrow road, one of the henchmen handcuffs him to Pamela, as the captors exit the car and attempt to move the sheep, but he escapes, dragging the unwilling woman along. Hannay and the attached Pamela evade the spies by hiding under a bridge covered with sheep at one point and behind a waterfall at another, in a Chaplinesque sequence.
They walk across the countryside and stay the night at an inn, Pamela is still skeptical about Hannay's story. The couple hide their handcuff problem by pretending to be unable to keep their hands off each other. The innkeeper's wife believes they are an illicit couple in love, and lies to protect them when there are inquiries as to who is staying at the inn. There are awkward moments when she takes off her wet stockings and they lie on the bed handcuffed. While he sleeps, she manages to slip out of her handcuff. On her way out, she hears one of the fake policemen on the telephone downstairs and the conversation confirms Hannay's story.
She returns to the room and sleeps on a sofa. Next morning, she tells him what she heard, they return to London and she goes Scotland Yard with the tale of the spy plot. No secret documents have been reported missing however, so she is not believed. Instead, they follow her to find Hannay.
She goes to meet Hannay at Mr. Memory's show at the London Palladium, finds him, and sits next to him. Hannay observes Professor Jordan in a box. As the performer is introduced, Hannay recognizes his theme music - it's an annoyingly catchy tune he hasn't been able to forget for days. Hannay puts two and two together and realizes that the spies are using Mr. Memory to smuggle the secrets out: he has them memorized so there are no paper documents. As the police take Hannay into custody, he shouts out a question: "What are the 39 Steps?" Mr. Memory compulsively begins to answer, "The Thirty-Nine Steps is an organization of spies, collecting information on behalf of the foreign office of ...." Jordan shoots him and tries to flee, but is apprehended. The dying Mr. Memory recites the information stored in his brain, formulas for the design for a silent aircraft engine.