Sidney Bruhl (Caine) is a playwright who is most famous for his mystery thriller "The Murder Game." Following the debut of the latest of a series of flops, he returns to his home in East Hampton and to his wife Myra (Cannon). He tells her that he's received a play called "Deathtrap" from a former student from a playwriting seminar. The play is ready for production and Sidney jokingly suggests that he murder the student and steal the play, a joke that becomes more serious when he learns, after calling the student, that no one else has read the play and no one else has a copy. Sidney invites the student up to Long Island.
The student, Clifford Anderson (Reeve), arrives shortly thereafter. Myra, who has a heart condition, becomes more and more agitated as the evening progresses, trying desperately to convince Sidney to work with Clifford on "Deathtrap" and share the revenue. Instead, Sidney attacks Clifford, strangling him with a chain. He forces Myra to help him drag Clifford into the yard to bury him.
Following the burial, the Bruhls get a visit from psychic Helga ten Dorp (Worth), who's staying with the Bruhls' neighbors. Helga wanders around the living room and study, sensing pain and death in various spots and associated with various prop weapons and handcuffs Sidney has displayed on the wall. She warns Sidney about a man in boots who will attack him. As she prepares for bed, Myra continues to be horrified, only slowly coming to see something of glamour in Sidney's act. Suddenly, Clifford bursts through the bedroom window and beats Sidney with a log. Myra flees and Clifford chases after her until her heart gives out; she collapses and dies. Sidney calmly descends the stairs, uninjured, and sidles unperturbed to Clifford's side. The men exchange a few words before their feelings emerge. They kiss, deeply and passionately. Their plan is a success: Myra is out of the way.
Immediately after Myra's funeral, Clifford moves in as Sidney's "secretary." Clifford works on a play which he says is about a welfare office but Sidney is suffering from writer's block. Sidney's lawyer Porter (Jones) comes over to settle some of Myra's affairs and notices Clifford is acting oddly about his manuscript pages. Sidney sends Clifford off on a pretext errand and breaks into his desk to read the manuscript. He is horrified to discover that Clifford is writing the true story of Myra's murder as a play called "Deathtrap." When confronted, Clifford offers to share the work and the credit. Sidney demurs: he wants to be remembered as the man who wrote "The Murder Game," not as "the faggot who knocked off his wife." When Clifford insists he'll write the play without him, Sidney reluctantly capitulates.
A few days later, Helga stops by again, ostensibly to borrow some candles in case the power goes out in a storm that's blowing in. She meets Clifford and, when Sidney returns from a dinner party a few minutes later, warns him that Clifford is the man in boots. Sidney assures her that he'll be sending Clifford away, and Helga leaves.
Sidney asks Clifford to help him act out some possible bits of business for the play, first by resisting a frontal assault, then by demonstrating how he might wield an axe. Finally, Sidney produces a gun he's secreted for this moment, trains it on Clifford and tearfully explains to him that he cannot allow completion of "Deathtrap" and can only stop him with a bullet. Sidney bids Clifford good-bye and pulls the trigger.
The gun doesn't go off, though, because Clifford has taken the bullets to load a different gun that he has at the ready. Now in control again, Clifford grabs wrist and leg manacles from the prop wall and has Sidney chain himself to a chair. Clifford tells him that he's going to leave soon but, just before, will unlock one of Sidney's cuffs to allow time for his escape. Clifford will complete "Deathtrap" and, if anyone asks, deny that it's inspired by Sidney's story. After Clifford exits to pack, Sidney slips out of the trick cuffs (once the property of Harry Houdini) and grabs a crossbow off the weapon wall. He stalks Clifford and fells him with a single shot.
There's a body to dispose of now, but the storm hits with full force, knocking out the power. Before Sidney can find a match to light a candle, a fleeting figure scurries through the living room in a flash of lightning. It's Helga, fully aware that she's in mortal danger. Sidney finds a knife, Helga grabs a gun. Clifford regains consciousness and trips Helga. The gun goes flying and a struggle for it ensues that...
...cuts to the same struggle played live by actors before a full house, where "Clifford" stabs "Sidney" and both die, leaving "Helga" victorious. The opening night audience erupts in thunderous applause, and at the back of the house stands Helga ten Dorp, now the author of a hit Broadway play called "Deathtrap."