Plot
Police informant Michael Marks awakens in a room with a spike-filled mask locked around his neck. Billy the Puppet on a screen says that the key to open the death mask has been surgically inserted behind his eye. He cannot bring himself to cut his eye, and is killed when the mask closes on his head.
At the scene of Michael's murder, Detective Allison Kerry finds a message for her former partner, Detective Eric Matthews. Eric joins Kerry and Officer Daniel Rigg in leading a SWAT team to the factory which produced the lock from Michael's trap. There, they apprehend John Kramer, the Jigsaw Killer, who indicates computer monitors showing eight people trapped in a house, including his only known survivor Amanda Young, Eric's son Daniel, and six other victims: Xavier, Jonas, Laura, Addison, Obi, and Gus. A nerve agent filling the house will kill them all within two hours, but John assures Eric that if he follows the rules of his own game, he will find Daniel again in a safe place. At Kerry's urging, Eric agrees to buy time for the tech team to arrive and trace the video signal. During their conversation, John reveals to Eric that his main motivation for his games was a suicide attempt after his cancer diagnosis, which led to a newfound appreciation for life; the games are intended to help his victims develop the same appreciation.
A microcassette recorder informs the group that antidotes are hidden throughout the house; one is in the room's safe, and the tape provides a cryptic clue. Xavier ignores a warning note and uses the key provided with the cassette on the door, which triggers a revolver through the peephole that kills Gus. Once the door opens, they search the house and find a basement, where Obi, who helped with abducting the other victims, dies in a furnace trap while trying to retrieve two antidotes. In another room, Xavier's test involves digging through a pit filled with syringes to retrieve a key to a steel door in two minutes, but he instead throws Amanda into the pit. She retrieves the key, but Xavier fails to unlock the door in time. The group eventually determines that each has been incarcerated before except Daniel. During his father's test, John reveals their affiliation to Eric, who was a corrupt police officer who framed his suspects in various crimes.
Xavier returns to the safe room and finds a number on the back of Gus's neck. After realizing the numbers are the combination for the safe, he kills Jonas and begins hunting the others. Laura succumbs to the nerve agent and dies, after finding the clue revealing Daniel's identity. Incensed by the revelation, Addison leaves on her own and finds a glass box containing an antidote, but her arms become trapped in the openings which are lined with hidden blades. Xavier enters the room and leaves her to die after reading her number. Amanda and Daniel find a tunnel from the first room leading to a dilapidated bathroom, finding Adam and Zep's bodies. After Xavier corners them, Amanda taunts him by implying that he will not learn his number because nobody will read it to him. Xavier responds by cutting off a piece of skin from the back of his neck to read his own number. Xavier charges them, and Daniel slits his throat with a hacksaw.
Having seen Xavier chasing his son, Eric assaults John and forces him to lead him to the house. The tech team tracks the video's source and while Rigg's team searches the house, Kerry realizes that the game took place days before they captured John and the footage they thought they had been seeing live was actually pre-recorded. The timer for Eric's game then expires and a safe in the factory unlocks to reveal Daniel inside, bound and breathing in an oxygen mask. Unaware of these events, Eric enters the house alone, reaches the bathroom, and is subdued by a pig-masked figure. He awakens shackled at the ankle to a pipe and finds a tape recorder left by Amanda, who reveals she had become John's accomplice after surviving her first trap and helped him set up Eric's test during the game at the house, intending to continue John's work after he dies. Amanda then appears and seals the door, leaving Eric to die as John hears his screams outside and smiles.