The film starts with Seth (Joris Jarsky ) in the pendulum trap. It is revealed Seth is a murderer who was released early from prison due to a technicality. Seth is told by Jigsaw's puppet that if he wants to live he has to destroy the things he has used to kill-his hands.The trap is later revealed to be unwinnable, but Seth is made to believe that the aim of the trap is for him to push buttons inside of two devices which would crush both of his hands before a bladed pendulum (intended to slice him in half) descends upon him. Seth had in fact, crushed his hands, but as the trap is unwinnable, the Pendulum does not stop. From the side of the room, somebody watches Seth getting sliced in half through a peep hole.
Meanwhile, Agent Strahm (Scott Patterson) shoots Jeff (Angus Macfadyen) and enters the room where Jigsaw (Tobin Bell) died. After investigating and finding Jigsaw's corpse, the door is locked on Strahm by Mark Hoffman (Costas Mandylor). Strahm finds a hidden door in the room and kicks it open. The outlines of the door had been painted with glow in the dark paint, only visible in the dark. The door leads down a new hallway. Strahm finds a tape recorder and plays it. Jigsaw's voice addresses him on the recording and warns him not to proceed, but to stay where he is, stating that he can find salvation or let his "insatiable hunger to uncover the truth drive (him) deeper in the abyss." Jigsaw urges him to make the right choice. Strahm disregards the warning and leaves the room, walking down the hallway. He is soon attacked by a figure in a pig mask, presumably Hoffman. He wakes to find himself in one of Jigsaw's traps. His head is in a sealed box, which quickly starts to fill with water. Before he runs out of air, he performs a tracheotomy with the tube of a ballpoint pen in order to breathe. The police make it to the Gideon warehouse, and Hoffman emerges carrying Corbett (Niamh Wilson), claiming that he saved her. Strahm is carried out on a stretcher, still alive, but badly injured.
The next day the police hold a service for all the people who have died chasing Jigsaw. The Chief of Police (Al Sapienza) announces that the Jigsaw murders are over and promotes Hoffman. John Kramer's ex-wife, Jill (Betsy Russell) is given a videotape and box from John's lawyer. The contents of the box, says John, are of grave importance to her. After looking in the box, Jill leaves without telling John's lawyer what's inside. Later she meets Agent Dan Erickson (Mark Rolston), Strahm's boss, and informs him she believes Agent Strahm is following her.
Strahm is shown mourning next to a empty hospital bed, because Agent Perez (Athena Karkanis) died during the night. Agent Erickson, Strahm's boss, visits Strahm telling him he has taken him off the Jigsaw case. Strahm is dismayed and angered. Hoffman walks into the room. Strahm starts to act suspicious and says that Perez's final word was "Hoffman." Hoffman worriedly says he has no idea what Strahm is talking about. He heads back to his office and finds a note for him saying "I know who you are." Hoffman gets worried that his secret is threatened, and that he may be in danger. Later, Hoffman heads off to a lair where several monitors are placed on a table, depicting five unconscious people on the first monitor.
Meanwhile, the five people wake up in a sewer, in a neck tie trap. They are told by Jigsaw's puppet that "Five will become one, with the common goal of survival." He states that while their "lifelong instincts will tell you to react one way, I implore you to do the opposite." The first part of their test involves pulling against a cable to get a key at the end of the room to release themselves. The consequence for not completing the trap is to be beheaded. They deduce they need to work quickly as nail bombs are set to go off in the room once the timer counts down. Mallick (Greg Bryk) gets anxious and runs ahead, starting the timer. In the end, everyone, except for Ashley, gets their keys. Ashley (Laura Gordon) is eventually beheaded by the blade once the cable is pulled tight. The group walks through a door to the next room.
Strahm, contemplating what his deceased partner said, heads over to FBI headquarters to find files on Hoffman. He finds a file saying that Hoffman's sister was murdered, and her killer (Seth) was killed in his trap, which was revealed to have taken place before the events of the first film. Strahm comes to the conclusion that Hoffman killed Seth, but staged it as a Jigsaw trap. Hoffman designed and orchestrated the trap himself using a voice modulator to disguise his voice as Jigsaw's and designed his own puppet to deliver Seth's message. A flashback depicting Hoffman looking at the pendulum trap ensues, as he was the person watching at the start of the film. Some time after Seth's death, Hoffman is kidnapped by Jigsaw who has discovered who was truly responsible for Seth's death. Jigsaw scolds Hoffman and blackmails him into working for him, which Hoffman reluctantly agrees to. Hoffman is then shown, through flashbacks, setting up the house trap, talking to Jigsaw before the events of "Saw IV", and kidnapping Paul (Mike Butters). After watching Paul fail his trap through a peephole, Jigsaw gives Hoffman Dr. Gordon's penlight, which he would later plant at Mark's crime scene. Logic reveals that there must have been at least one Jigsaw victim, unknown to the viewers, tested before Paul, where the puppet was used. That way, Hoffman and the authorities would know of the puppet, and Hoffman could use it for Seth's trap. By the end of these events, Hoffman is a willing apprentice to Jigsaw.
Back in the sewers, Charles (Carlo Rota), Mallick, Luba (Meagan Good), and Brit (Julie Benz) make it to the next trap. In this trap, the group has to smash jars filled with glass to find keys to enter bomb shelters before a bomb goes off in the sewer. There are four bomb shelters, but only three of the keys will fit the locks. Jigsaw's puppet tells the group to decide which of them will be "the odd man out." Mallick begins to smash the jars with a pole. Charles beats Mallick with a pole down to the ground, with the intent of sacrificing Mallick's life so the rest can escape to safety. Brit and Luba pick up keys. Mallick attempts to pick up a key but Charles steps on his hand and takes it. Just as Charles is about to enter his shelter, Luba hits him with a pole and gives the key back to Mallick. The trio enter the shelter and leave Charles to die by the explosion. Luba, Mallick, and Brit make it to their next test. In this test, they have to find a way for five cords of electricity to make it into a bath of water to complete a circuit opening the door to the next test. However, the cords are not long enough to reach the bath water so they think they need to use a person's body as an electrical conductor. Luba tries to kill Mallick to use his body, but Brit stabs Luba in the neck, saying she never trusted her. Mallick and Brit use Luba's body for the electricity to reach the bath, and the door opens to their final test.
Meanwhile, Hoffman steals Strahm's cell phone from the evidence locker and plants it at the house where Brit and Mallick's game is being held, in hopes to frame him. Strahm is now sure that Hoffman is Jigsaw's apprentice. Meanwhile, Brit and Mallick make it to their final test. In this test they have to stick their hands in rotating saws and bleed into a beaker. When the beaker fills with the labeled volume of their blood, the door to the room will unlock and they will be free to go. Before they start the test they realize that there are five saws and five openings on the contraption, for which to stick arms into. They then realize that everyone could have made it through every test alive. Only one key was needed to unlock each neck restraint in the first trap, the bomb shelters had room for two in the second trap, and each person could have sustained a mild electric shock to complete the circuit in the third trap. It is also revealed that they were all connected by an act of arson that happened some time ago which resulted in the death of 8 people. In the final test, each could have given just two pints of blood and easily lived. Brit and Mallick realize the aim of their game was to work together and to help keep all five alive, unlike "survival of the fittest", as they had all thought. With no other options, the two remaining survivors begin sawing their arms in an attempt to fill the beaker meant for five with 10 pints of their blood. Just as Brit and Mallick fill the beaker with blood, finishing the final test, a FBI agent named Erickson (Strahm's superior whom Hoffman fooled into trailing Strahm's cell phone signal) arrives at the scene. Both pass out from blood loss as Erickson finds them and calls for backup. It appears as though Brit survived and Mallick did not. FBI agent Erickson, having found the Jigsaw files Hoffman planted, along with Strahm's cell phone, issues an APB on Strahm, assuming him to be the other Jigsaw accomplice.
Strahm follows Hoffman to a new location, possibly Hoffman's house. It is revealed that the house is the same one from Saw II where the group game took place. The house has since been refurbished and made liveable. Strahm follows Hoffman into the house and finds the trap door leading to the underground structure of the house. Passing the bathroom, its door sealed closed, Strahm finds a new room and enters it. Inside the room is a transparent box filled with broken glass and a recording featuring Hoffman's voice, rather than Jigsaw's. Hoffman urges Strahm to have trust and to get into the box. He'll be hurt, but has a chance at life. Strahm shuts off the tape when he hears Hoffman walking in the distance behind him. Strahm hides behind the door and shortly after, Hoffman walks into the room while Strahm approaches Hoffman from behind, holding him at gunpoint. Following an altercation, Strahm shoves Hoffman into the box, sealing him in. Hoffman signals for Strahm to play the rest of the tape. The rest of the tape plays and explains the rest of the rules to Strahm, making him realize he would have lived if he had gotten into the box, stating that if he wouldn't, the room would become his tomb, and he would simply "vanish". Jigsaw's tape addressing Strahm at the beginning of the film was not referring to the "sick room", but the current one. The walls begin to close in on the room as the glass box lowers into the floor, safe from the enclosing walls. Strahm attempts to break into the glass box by shooting it and trying to pull it open, but the glass material is impenetrable. Strahm starts shouting at Hoffman, "I know who you are!". Soon the walls come close enough for Strahm to attempt to climb up to the ceiling and escape by the roof filter. However, it is too late, and he becomes slowly crushed by the walls while Hoffman watches Strahm getting crushed from down below. With all evidence planted to frame Strahm for being the next Jigsaw accomplice, Hoffman is now able to continue his work as Jigsaw's surviving apprentice, undetected, leaving the Jigsaw legacy pinpointed at Strahm who is in fact dead.
It is also believed that Jigsaw's autopsy occured after the events of Saw V, giving new insight to Hoffman being "the last man standing", now that Strahm is dead. Therefore, Hoffman has yet to be tested as promised by the tape found at the autopsy. The beginning/end of Saw IV was not the setup for Saw V but presumably (and hopefully) Saw VI.