Amateur tennis star Guy Haines (Farley Granger) wants to divorce his vulgar, promiscuous wife Miriam (Kasey Rogers) so he can marry the elegant Anne Morton (Ruth Roman), the daughter of a US Senator. On a train, Haines meets a psychopath, Bruno Antony (Robert Walker), who tells him about his idea for a murder scheme: two perfect strangers meet and “swap murders”—Bruno suggests he kill Miriam and Guy kill Bruno’s hated father. Each will kill a total stranger with no apparent motive, so neither will be suspected. Guy humors Bruno by pretending to find his idea amusing, but Bruno mistakes Guy’s response as agreement to the scheme. Eager to get away from Bruno, Guy forgets his monogrammed cigarette lighter, engraved “A to G” with crossed tennis rackets, which Bruno keeps.
Guy meets with Miriam, who is pregnant by someone else, at her workplace in Metcalf, their hometown. Miriam informs Guy that she no longer wants to end their marriage and threatens to blackmail him by claiming that the baby is his to thwart any divorce. After they argue loudly in front of Miriam’s co-workers and Guy shakes her violently, Guy calls Anne and, speaking figuratively, says he would like to kill Miriam. Later, Bruno follows Miriam to an amusement park and strangles her to death while Guy is traveling on a train. When Guy arrives home, Bruno informs him Miriam is dead and insists he honor their deal by killing Bruno’s father.
Guy goes to the Mortons’ Washington, D.C. home, where Anne’s father, Senator Morton (Leo G. Carroll), informs Guy that his wife has been murdered. Guy feigns ignorance, but Anne’s sister Barbara (Patricia Hitchcock) says that the police will think that Guy is the murderer as he has a motive. The police question Guy, but are unable to confirm his alibi: A professor (John Brown) Guy met on the train was so drunk that he cannot remember their encounter. Instead of arresting Guy, the police assign a round-the-clock escort to ensure that he does not flee while they investigate.
To pressure Guy, Bruno follows him around Washington, introduces himself to Anne, and appears at a party at Senator Morton’s house. To amuse another guest (Norma Varden), Bruno demonstrates how to strangle someone by playfully putting his hands around her neck. His gaze falls upon Barbara, whose glasses and physical appearance resemble Miriam’s. This triggers a flashback and he actually starts to strangle the woman before blacking out. Barbara tells Anne that Bruno was looking at her while strangling the other woman and Anne realizes that Barbara resembles Miriam. Her suspicions aroused, Anne confronts Guy, who tells her the truth about Bruno’s crazy scheme.
Bruno sends Guy a pistol, a house key and a map showing the location of his father’s bedroom. Guy pretends to agree to Bruno’s plan. He creeps into Bruno’s father’s room hoping to warn him of his son’s murderous intentions, but instead he finds Bruno there waiting for him. He tells Guy he became suspicious when he suddenly agreed to honor their bargain and made sure his father was away. Guy tries to persuade Bruno to seek psychiatric help; Bruno threatens to punish Guy for betraying him and make Guy pay for the crime from which he is benefiting.
Anne visits Bruno’s house and unsuccessfully tries to explain to his mother (Marion Lorne)—who seems merely befuddled but is actually severely disturbed— that her son is a murderer. Bruno mentions Guy’s missing cigarette lighter to Anne and claims that Guy asked him to search the murder site for it; Guy correctly surmises Bruno intends to incriminate him by planting it there. After winning a match at Forest Hills, Guy eludes the police and heads for the amusement park to prevent Bruno from planting the lighter.
Bruno is delayed at Metcalf when he accidentally drops Guy’s lighter down a storm drain and must retrieve it. When Bruno arrives at the amusement park, a carnival worker recognizes him from the night of the murder; he informs the police, who mistakenly think he means Guy. After Guy arrives, he and Bruno fight on the park’s carousel. Thinking Guy is trying to escape, a police officer shoots at him but instead kills the carousel operator, causing the carousel to spin out of control. A carnival worker crawls under the fast-moving carousel and applies the brakes but the mechanism fails, causing the carousel to crash; Bruno is trapped underneath it and mortally injured. The worker who recognized Bruno tells the police chief that he has never seen Guy before. Guy tells the police that Bruno was attempting to plant his lighter at the murder scene, Bruno continues to blame Guy, saying that the lighter is on the island, where Guy left it. As Bruno dies, his fingers open to reveal Guy’s lighter in his hand. Guy calls Anne to meet him the next day, and while they are riding home on the train a stranger asks if he is Guy Haines. They quickly leave the car.