Minutes after Amanda Young (Shawnee Smith) leaves him in the underground bathroom at the end of Saw II, Detective Eric Matthews (Donnie Wahlberg) escapes by breaking his foot with a toilet lid and slipping it out of his ankle chain. Six months later, another Jigsaw victim is discovered by Lieutenant Rigg (Lyriq Bent) and Detectives Kerry (Dina Meyer) and Hoffman (Costas Mandylor). In his test, Troy (J. Larose) was to rip chains from his body in order to flee from a bomb; however, the door to the room was sealed, making the trap inescapable and thus going against Jigsaw's methods. Kerry, who feels guilty over Matthews' disappearance, later awakens in a harness hooked into her ribs. A key to unlock the device is within a beaker of acid; though she retrieves it, the device still tears her ribcage apart in opposite directions, making her trap inescapable as well.
Jeff (Angus Macfadyen), a man who seeks vengeance for the death of his son, and Lynn Denlon (Bahar Soomekh), a depressed doctor, are also kidnapped under John Kramer's (Tobin Bell) orders. Lynn is brought before John, now bedridden from cancer, by his apprentice Amanda. She is given a straightforward game: keep John alive for the duration of Jeff's game. Should John die, or should she try to escape, the collar around her neck will fire five shotgun shells at her head. Meanwhile, Jeff awakens in the middle of an abandoned meatpacking plant and is informed that he must go through several tests, which will lead him to "the man responsible for the loss of his child."
In his first test, Jeff enters a freezer and finds Danica Scott (Debra Lynne McCabe), the only other witness to a drunk-driving accident that killed his son Dylan. By refusing to testify in court, she became an object in Jeff's vengeance. Danica is stripped naked and chained between two poles spraying ice-cold water at random intervals. She eventually convinces Jeff to help her, though she freezes solid before he can retrieve the key from behind frozen metal bars. In his second test, he successfully frees Judge Halden (Barry Flatman) from the bottom of a pit being filled with liquefied pig corpses, by incinerating his late son's toys to retrieve a key. Halden had only sentenced Dylan's killer to six months in prison, further fueling his vengeful side. The third test brings Jeff face-to-face with Timothy Young (Mpho Koaho), his son's killer, who is strapped to a machine that will twist his limbs and neck one by one until they break. Jeff retrieves a key attached to the trigger of a shotgun, but Halden is killed when the shotgun accidentally discharges, and Jeff is too late to save Timothy before his neck is fatally broken. With his tests nonetheless complete, Jeff moves on to the final area.
Meanwhile, Lynn and Amanda work together to keep John alive. During an improvised brain surgery intended to relieve tension on John's brain, he semi-consciously professes his love for another woman, who Amanda mistakes for Lynn. Distressed from witnessing this, Amanda leaves the sickroom to continue watching Jeff's progress. It is revealed that Amanda cuts herself in her stress, and she recollects speaking with John and kiddnapping Adam prior to the events of the first film. Soon after, Amanda also finds a letter addressed to her, its contents causing her more distress. Following the surgery, Lynn and John talk privately; Lynn reveals that her ordeal has given her a new appreciation for her family. Amanda returns with the news that Jeff's tests are complete, but she refuses to release Lynn, not believing she has learned anything. She doesn't believe anybody changes after being tested, and designed her tests to be inescapable accordingly, including Troy's and Kerry's. She also reveals that she and Eric Matthews fought after he escaped the bathroom, and that she managed to overpower him and leave him for dead. Additionally, she returned to the bathroom and gave Adam Stanheight (Leigh Whannell) a mercy killing, by suffocating him with plastic wrap.
Jeff arrives in the makeshift sickroom just as Amanda shoots Lynn in the back; he retaliates by shooting Amanda in the neck. A saddened John reveals to Amanda that Lynn's test was actually hers; she was being tested on her will to keep someone alive; she had not known that Jeff and Lynn were married. Amanda dies from her wound, and John gives Jeff one last test, where he can choose to either kill John or forgive him for all the pain he has caused him and his family. If Jeff forgives him, John will call an ambulance to save Lynn. Jeff takes a circular saw, tells John he forgives him, and slashes his throat. The door to the room seals as the dying John pulls out a tape recorder, which tells Jeff that he has failed the test by killing John, who was the only person to know the whereabouts of Corbett (Niamh Wilson), Jeff's daughter; Jeff would have to play another game to find her before she runs out of air. As the message ends, John goes into cardiac arrest and dies; the shotgun collar simultaneously destroys Lynn's head, leaving Jeff sealed in the room with the three corpses.