The American pulp Western writer Holly Martins arrives in post–Second World War Vienna seeking his childhood friend, Harry Lime, who has offered him a job. Martins is told that Lime was killed by a car while crossing the street. At Lime’s funeral, Martins meets two British Royal Military Police: Sergeant Paine, a fan of Martins’s books, and his superior, Major Calloway. Afterwards Martins is asked to give a lecture to a book club a few days later. He then meets a friend of Lime’s, “Baron” Kurtz, who tells Martins that he and another friend, Popescu, carried Lime to the side of the street after the accident and, before he died, Lime asked them to take care of Martins and Lime’s girlfriend, actress Anna Schmidt.
Martins goes to see Anna and becomes suspicious that Lime’s death was not an accident. The porter at Lime’s apartment building says that Lime was killed immediately and that three men carried the body, not two. Martins and Anna discover that the police are searching her flat; the police confiscate a forged passport and detain her. The next evening Martins visits Lime’s “medical adviser”, Dr. Winkel, who says that he arrived at the accident after Lime was dead, and only two men were there.
The porter offers to give Martins more information, but someone kills him before Martins can see him. When Martins arrives, the crowd believes that he is involved and becomes hostile. Escaping from them, Martins returns to the hotel, and a cab immediately takes him to the book club, where he makes a poor speech. When Popescu enters, he asks about Martins’s next book. Martins says that it will be called The Third Man, “a murder story” inspired by facts. Popescu tells Martins that he should stick to fiction. Martins sees two thugs advancing towards him and flees.
Calloway again advises Martins to leave Vienna, but Martins refuses and demands that Lime’s death be investigated. Calloway reveals that Lime’s racket was stealing penicillin from military hospitals, diluting it, and selling it on the black market, leading to many deaths. Martins, convinced, agrees to leave.
Martins learns that Anna too has been told about Lime’s crimes and is about to be sent to the Soviet sector. Leaving her apartment, Martins notices someone watching from a dark doorway. A shaft of light reveals the person to be Lime, who flees, ignoring Martins’s calls, and vanishes. Martins summons Calloway, who deduces that Lime has escaped through the sewers. The British police exhume Lime’s coffin and discover that the body is that of the orderly who stole the penicillin for Lime.
The next day, Martins meets with Lime, and they ride Vienna’s Ferris wheel, the Wiener Riesenrad. Lime obliquely threatens Martins, reveals the full extent of his ruthlessness, and then reiterates his job offer before leaving quickly. Calloway then asks Martins to help capture Lime, and Martins agrees, asking for Anna’s safe conduct out of Vienna in exchange. However, when Anna learns this, she refuses to leave. Exasperated, Martins decides to leave, but on the way to the airport, Calloway stops at a hospital to show Martins children dying of meningitis that had been treated using Lime’s diluted penicillin.
Lime arrives to rendezvous with Martins, but Anna warns him. He tries once again to escape using the sewer tunnels, but the police are there in force. Lime shoots and kills Paine, but Calloway shoots and wounds Lime. Badly injured, Lime drags himself up a ladder to a street grating, but he cannot lift it. Martins then kills him using Paine’s revolver. Later, Martins attends Lime’s second funeral. At the risk of missing his flight out of Vienna, he waits to speak to Anna, but she ignores him and walks past.