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) gun 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 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 the Flying Scotsman train to Scotland. He learns from a fellow passenger’s newspaper that he is the target of a nationwide manhunt as a murder suspect of Annabella Smith. To throw police searching the train off his track, he enters a compartment and engages in an extended kiss with the only occupant, Pamela (Madeleine Carroll), and the searchers see them and bypass the compartment. She however frees herself from his unwanted embrace and alerts the policemen when they come back. The train Is stopped on the Forth rail bridge after having the emergency brake triggered by the police when Hannay jumps onto the bridge and escapes.
The fugitive stays the night with a poor crofter (farmer) (John Laurie) and his young wife (Peggy Ashcroft), who realizes from a newspaper article that 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 runs, aided the wife, wearing the farmer’s dark Sunday coat. He arrives on foot at his target village and calls at a large estate occupied by recent arrivals in the area. A large party is going on, he gives the name Annabella Smith to the maid, and the master of the house and the maid lie to the police about seeing a stranger. When Hanay tells his story to the seemingly respectable Professor Jordan (Godfrey Tearle), Jordan reveals that he is missing the top joint of his baby finger. Jordan shoots Hannay, but luckily, the bullet is stopped by the farmer’s hymnbook that was left in a coat pocket.
Hannay drives to the local sheriff after stealing the professor’s car, but the sheriff and police refuse to believe his story about Jordan who has befriended them. Hannay is arrested for the London murder. Hannay breaks through a glass window and mingles as a member of a passing parade. He escapes into a door in an alley and 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 when he sees Pamela enter the hall. Hannay talks about a world in which no one is unjustly accused, no one is hunted and no nation plots against nation.
He is recognized by Pamela, who alerts two men she believes are police. Hannay is handcuffed and both he and Pamela taken away to the police station in a car. Pamela notices they pass the police station and the captors say they are going to another police station in another town. When Pamela notices they have missed the turn to the town, Hannay realizes they are not the police. He proves his theory by looking for a reaction from his captors when he mentions their boss has a missing joint from his finger. When a flock of sheep blocks the narrow road, one of the henchmen handcuffs Hannay to Pamela and the captors exit the car and attempt to move the sheep. Hannay 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.
They walk across the countryside and stay the night at an inn, Pamela still doesn’t believe Hannay’s story even though he tries his best to convince her. The couple hide their handcuffs by pretending to be a lovers unable to keep their hands off each other. The innkeeper’s wife believes they are a runaway couple in love, and lies to protect them when the fake police show up and make inquiries as to who is staying at the inn. There are awkward comedic moments when Pamela 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 escape, she overhears one of the fake policemen speaking on the telephone downstairs and the conversation confirms Hannay’s story. She returns to the room and sleeps on a sofa.
The next morning, Pamela tells Hannay what she overheard including the fact that the spy’s are heading to London. Pamela calls Scotland Yard before leaving Scotland and then visits them when she gets to London. Scotland Yard has investigated the tale of the spy plot. No secret documents have been reported missing however, so she is not believed. Instead, they let her leave and follow her to find Hannay.
Pamela 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 as the means 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….” Suddenly, Jordan shoots him and tries to flee, but he is quickly apprehended. The dying Mr. Memory recites the information stored in his brain, formulas for the design of a silent aircraft engine. The final shot shows Hannay, with his handcuff still on, holding hands with Pamela.