Michael Marks (Noam Jenkins), a police informant, awakens to find two halves of a spike-filled helmet locked around his neck. A videotape informs him that the key to the trap has been implanted behind his right eyeball. He finds a scalpel but cannot bring himself to cut out his eye, and is killed instantly when the helmet slams shut around his head when time runs out. Detective Eric Matthews (Donnie Wahlberg) is called to the scene after a message is found on the wall directed at him. Later, he follows Detective Kerry (Dina Meyer) and a SWAT team led by Sergeant Rigg (Lyriq Bent) to an abandoned steel factory, where they find John Kramer, who is heavily weakened from his cancer. Computer monitors in John's lair show that eight people are trapped in an abandoned house: among them are Matthews' son, Daniel (Erik Knudsen), who he previously argued with, and Amanda Young (Shawnee Smith), Jigsaw's only known survivor. The eight victims have two hours before the nerve gas filling the house kills them, but John promises Matthews that he'll see his son "in a safe, secure state" if he simply talks with John for a while. Reluctantly, Matthews agrees to the conditions in order to buy time for the tech team to arrive and trace the video signal.
In the nerve gas house, the eight victims are told that antidotes can be found around the house to save them from the gas. Gus Colyard (Tony Nappo) is shot dead by the door to the room, which is booby-trapped with a revolver, when Xavier Chavez (Franky G) accidentally triggers it. The search continues to the basement, where the group learns that one of them, Obi Tate (Timothy Burd), was an accessory to the kidnappings; he had kidnapped Laura Hunter (Beverley Mitchell), who shows more strain from the gas than the others. Obi attempts to retrieve two antidotes from a small furnace, but is burned alive when he unintentionally activates it. As Amanda reveals to Daniel that she was framed for her possession charge which sent her to prison, Jonas Singer (Glenn Plummer) leads them to a door, which Xavier and Addison Corday (Emmanuelle Vaugier) are attempting to force their way through. In the room is a pit filled with thousands of needles and syringes; a key to an antidote is hidden inside. The trap is intended for Xavier, but he instead throws Amanda into the pit; she retrieves the key, but Xavier fumbles with it and fails to unlock the door in time. Frustrated with the group's lack of success, he abandons the others.
Meanwhile, John explains to Matthews how he came to begin his "work": after being diagnosed with cancer, he attempted to commit suicide by driving off a cliff, but survived the crash and vowed to spend the rest of his life testing others' wills to survive. When the tech team finally arrives, John reveals to Matthews that the seven victims aside from Daniel are criminals that Matthews himself framed for various crimes; should Daniel's identity be discovered, he will be in great danger. In an effort to make John reveal the location of the house, Matthews destroys several of John's plans and work, but fails to get a reaction.
Xavier returns to the first room, which contains a safe containing an antidote, and discovers a colored number on Gus' neck; he realizes by connecting this to their first clue that one colored number is on the necks of each victim. He kills Jonas in a fight and begins stalking the other victims. In another area of the house, Laura finally succumbs to the nerve gas, and the others learn of Daniel's identity. Addison and Amanda both abandon him, but Amanda quickly returns when she discovers Xavier advancing on them. Addison, meanwhile, finds an antidote in a glass box with arm sockets lined with razor blades, which her wrists get trapped in; Xavier finds her, but leaves her to die after reading her number. Amanda and Daniel retreat to the safe room, where they discover an underground tunnel that leads to the bathroom of the first film; ( were Adams corpse is seen in a progressive state of decomposition ) Daniel collapses upon entering. When Xavier arrives, Amanda points out that he cannot read his own number; he cuts off a piece of skin from the back of his neck, then advances on the two, upon which Daniel attacks and kills him with a hacksaw, having only feigned collapse.
Detective Matthews loses control after seeing Xavier begin chasing Daniel and Amanda and violently attacks John, eventually forcing him to take him to the house at gunpoint. The section that John was sitting in is revealed to be an elevator, allowing him and Matthews to escape. Simultaneously, the SWAT team follow the signal of the video feed to another house, which contains VCRs playing back previously recorded images of the eight victims; Kerry realizes that the events of the house took place before they raided the factory. Matthews enters the house and eventually reaches the bathroom, where he is attacked by a figure wearing a pig mask. The two-hour timer expires in John's lair and a large safe opens, revealing Daniel hyperventilating into an oxygen mask. Upon awakening, Matthews finds himself chained by the ankle to the pipes; an audiotape lying beside him, recorded by Amanda, reveals that she has become John's protege. She appears in the doorway and seals the bathroom door shut with Matthews inside while outside the house, a bloodied John slowly forms a smile.