Tony Wendice (played by Ray Milland), an English professional tennis player, is married to wealthy socialite Margot Mary Wendice (played by Grace Kelly), who had an affair with American crime-fiction writer Mark Halliday (played by Robert Cummings). When Tony retires from tennis, he secretly discovers the affair between them and decides to murder his unfaithful wife, both for revenge and to ensure that her money will continue to feed his already-comfortable life.
Tony invites an old acquaintance from the University of Cambridge, Charles Alexander Swann (played by Anthony Dawson), to his London flat. Tony is aware, (unbeknownst to Swann), that Swann has become an aliased small-time criminal (a.k.a. Captain Lesgate), and has been secretly following Swann so he can blackmail him into murdering his wife. Tony tells Swann about Margot’s affair. Six months ago, Tony had stolen her handbag, which contained a love letter from Mark, and anonymously blackmailed her. After tricking Swann into leaving his fingerprints on the letter (by tricking him into touching it), Tony offers to pay him £1,000 to kill Margot; if Swann refuses, Tony will turn him in to the police as Margot’s blackmailer. Swann’s credibility, in denying Tony’s accusation, would be hurt by his criminal records.
After Swann agrees, Tony explains his plan: the following evening he will go with Mark to a party, leaving Margot at home while hiding her latchkey outside the carpet of the staircase facing the front door of their flat. Swann is to sneak in when Margot is fast asleep and hide behind the curtains in front of the French doors to the garden. At eleven o’clock, Tony would telephone the flat from the party. Swann must strangle Margot when she answers the phone, open the French doors, leave signs that would trick the police into believing that a burglary had gone wrong and then exit through the front door before hiding the key again.
The following night, Swann enters the flat while Margot is in bed, and waits. At the party, Tony discovered that his watch has stopped, so he phoned the flat at 11.03 pm – three minutes later than intended. When Margot comes to the phone, Swann tries to strangle her with his scarf, but she manages to grab a pair of scissors and stab him in the back. The situation wasn’t helped by the fact that Swann fell on his back. She picks up the telephone receiver and pleads for help. Tony tells her not to touch anything until he arrives home. When he returns to the flat, he calls the police and sends Margot to bed. Before the police arrive, Tony moves what he thinks is Margot’s latchkey from Swann’s pocket into her handbag, plants Mark’s letter on Swann, and destroys Swann’s scarf, replacing it with Margot’s own stocking in an attempt to incriminate her.
The following day, Tony persuades Margot to hide the fact that he told her not to call the police immediately. Chief Inspector Hubbard (played by John Williams) arrives and questions the Wendices, and Margot makes several conflicting statements. When Hubbard says Swann must have entered through the front door, Tony falsely claims to have seen Swann at the time Margot’s handbag was stolen, and suggests that Swann made a copy of her key. Hubbard did not believe this because no key was found on Swann’s body upon inspection. Hubbard arrested Margot after concluding that she killed Swann for blackmailing her. Margot is found guilty and sentenced to death.
Some months later, on the day before Margot’s scheduled execution, Mark visits Tony, saying he has devised a story for Tony to tell the police in order to save Margot from the execution. But it turned out that Mark’s “story” was very close to what did actually happen. Tony bribed Swann into murdering Margot. Tony says the story is too unrealistic, and that Hubbard would never believe him – even in his dreams. However, just then Hubbard arrived unexpectedly, and Mark, facing scarcity of hiding places, hides in the bedroom. Hubbard proceeded to tell Tony about large sums of cash he has been spending, tricks him into revealing that his latchkey is in his raincoat, and inquires about Tony’s attaché case. Tony claims to have lost the case, saying that it contained around 2-3 pounds and some other stuff. But Mark, overhearing the conversation, finds it on the bed, full of banknotes. Deducing that the money was Tony’s intended payoff to Swann, Mark stops Hubbard from leaving and explains his theory. Tony tells another lie, “confessing” that the cash was Margot’s blackmail payment to Swann, which he had concealed to cover up her guilt. Hubbard appears to accept Tony’s explanation over Mark’s theory, and Mark leaves angrily. Hubbard discreetly swaps his own raincoat with Tony’s, and as soon as Tony leaves, Hubbard uses Tony’s key to re-enter the flat, followed by Mark. Hubbard had already discovered that the key in Margot’s handbag was Swann’s own latchkey, and deduced that Swann had put the Wendices’ key back in its hiding-place after unlocking the door. Now, correctly suspecting Tony of having conspired with Swann, Hubbard had developed an elaborate ruse to confirm this.
Plainclothes policemen bring Margot from prison to the flat. She tries unsuccessfully to unlock the door with the key in her handbag, then entered through the garden, this proving that she was unaware of the hidden key and thus, her innocence. Hubbard had Margot’s handbag returned to the police station, where Tony retrieved it after discovering that he had no key. The key from Margot’s bag did not work, so he used the hidden key to open the door, thus proving his guilt. Earlier, Hubbard had instructed another policeman to stay hidden in the staircase, and catch him once he went in – if he did. As he came in, he sees Hubbard, Margot and Mark. It doesn’t take him long to realise his game was up. He darts outside – only to see that the backup policeman outside. With his escape routes blocked by Hubbard and another policeman, Tony calmly makes himself a drink, congratulates Hubbard and admits defeat.