The Dauntless soldiers chase Tris, and fires at them. Tris is horrified to realize that Will is among them. She hesitates, but his gun is pointed at her, so she does the only thing she can and shoots him in the head. His smiling face appears in her mind as she screams and sobs, realizing what she's done. But she makes it to her family's hideout, knocks on the door, and Caleb appears. He's wearing gray again, not Erudite blue. They hug and he takes her inside to deal with the gunshot wound in her shoulder.
There are a handful of Abnegation there, including Marcus Eaton. But the pain in her shoulder is pressing. Her father volunteers to dig the bullet out, despite their earlier friction. Caleb explains that he researched the simulation serum like their mother told him and found out what Jeanine was planning, and dropped out of Erudite initiation at once. Her father asks where her mother is, and Tris admits quietly that she sacrificed herself.
Marcus says their safest bet is to go to the Amity compound. He asks Tris about the Dauntless strategy, and she explains that they have none; they're being completely mind controlled and have been sleepwalking through the entire battle. Tris decides that the only way to end this is to wake the Dauntless up, and to do that they need to find the computer program that controls the simulation and destroy it. She realizes it must be in the Dauntless control room, because that was where Jeanine sent Tobias. They split up; Tris asks for anyone who will fire a gun, and who isn't afraid of heights, and the rest continue on to Amity.
Caleb, Marcus, and Andrew Prior accompany Tris to Dauntless, and for everyone but Tris, jumping onto the moving train proves very difficult. Marcus assumes she now regrets choosing Dauntless, but Tris denies it, saying there were some things she needed to learn - including how to be selfless, as selflessness is bravery.
The group has to jump off the train onto a roof, just as Tris did on her first day as an initiate. Then they have to jump down onto the net, which predictably Caleb, Marcus, and Mr. Prior have trouble with. They sneak into the compound, but someone begins to shoot at them, and Tris realizes that the guard is Peter. He's awake, and when Tris puts a gun to his head and asks him why, he says the Dauntless leaders evaluated his records and removed him from the simulation. With the gun still at his head, she asks him where the computers that control the simulation are. When he refuses, she shoots him in the arm. He says the only way he'll tell her is if she takes him with her, because the Dauntless will kill him. She finally agrees.
They head for the glass building above the Pit, and Tris and her father argue over whether or not she had the right to shoot someone. Tris says that violence is necessary to ensure their safety, and watches as she shoots at the next set of guards. Finally there's only one guard left, and when Tris has two guns pointed at him, he jerks his chin to the side, telling her to go. She realizes he must be Divergent. She gives everyone the all-clear and tells Caleb and Marcus to stay and watch Peter, then goes off in the elevator with her father. But when it reaches the eighth floor, they are set upon by guards. Both Tris and her father shoot at the guards and then advance. However, Mr. Prior is shot in the stomach and slumps to the floor. Helpless, Tris watches her father die. Tris is devastated, but she knows she has to keep going. She makes it to the control room, which consists of a wall covered with screens showing different scenes in the city. In front of a screen streaming code sits a Dauntless soldier - Tobias.
Tobias, still stuck in the simulation that makes him think Tris is his enemy, tells Tris to drop her weapon or he'll fire. She does, but he continues to command her to, unaware that she already has. She runs at him and he punches her in the jaw, and she kicks him in the stomach. She refuses to shoot him and instead continues to say his name, because she knows he's in there somewhere. He begins to falter, and she knows she can't kill him. She thinks of her father's words, that there is power in self-sacrifice, and places the gun in Tobias's hands. He presses it against her forehead, and she's prepared to die.
There is no shot. Tobias stares at Tris. Knowing he's fighting the simulation, she wraps her arms around him, and he drops the gun, says her name, and kisses her: it's him again. Tris asks how he was able to break out of the simulation, but he says he doesn't know; he just heard her voice. They look at one of the screens and see Dauntless soldiers surrounding Marcus, Caleb, and Peter, and Tobias runs to the code screen and taps it a few times, and then all the sudden the soldiers go still. Tobias extracts the data to make sure the simulation can't be run again. On their way back down, Tris is horrified by the sight of her father's body. She allows herself five seconds of weakness before getting up again.
Caleb runs at her the moment the elevator reaches the ground, and when he asks about their dad and she shakes her head, says he would've wanted it that way, anyway. Tris realizes she didn't warn Tobias about Marcus, and when Marcus sees him, he tries to wrap his arms around him, which makes Tobias wince. Tris warns him to stay away from Tobias, because she knows the Erudite report about him was true.
It's time for the group to get out of Dauntless fast, and they decide to take the train to the Amity compound to catch up with the others who escaped. Caleb wonders what side Candor will take. Tris thinks about all the people she loves, all her friends out there somewhere just freed of the simulation. She knows Christina will find Will's body, and never forgive Tris for shooting him. On the train, she tells Tobias that her parents died today, and died for her, and Tobias says to them, there was no better way to show they loved her. He asks why Tris didn't shoot him, and she says because it would've been like shooting herself. The novel ends with Tobias telling Tris he might be in love with her, and Tris pulls out the hard drive with the simulation data and sees Marcus staring at it greedily. Tris knows their battle has just begun.
This final section of the novel is a fast-paced chain of events that lead to some sort of resolution - and set up the next book in the trilogy, Insurgent. Tris's father is finally able to forgive her for deserting her family on Choosing Day, and even makes the ultimate sacrifice to show he still loves her, just like her mother. The sacrifices of both her parents showed that they were Abnegation until the end: selfless and giving. They were both able to be true to their family and their faction at the same time, which has often been a struggle for Tris throughout the novel.
Caleb, on the other hand, had to leave his faction in order to stay true to his family, but this shows that his values lie in the right place. He could have feigned ignorance once he learned of the simulation and Jeanine's plans, and remained safe in Erudite, but instead he choose to risk his entire future and well-being to drop out of initiation because he didn't want to be involved in something so evil. In this case, Caleb has proved his selflessness; just like Tris, he has not left his Abnegation roots behind after all. He made a choice to leave, a choice central to his identity; he will not be a part of a movement designed to kill innocent people.
Tris takes several lives in this section of the book, and it is clear that it will in some way take a toll on her. Though she could not bring herself to shoot Tobias, she did shoot Will when she believed she had no other choice. Perhaps she could have tried another way to disarm Will, but in the moment she did what she had to do to survive - like her mother and father did. This hasty decision could cost Tris dearly in the future, particularly where Christina is concerned.
But regardless of her potential mistakes, Tris has certainly come a long way in the course of the novel. Gone is the timid Abnegation girl who could only look at herself a few times a year, who made all her decisions intending to please everyone else rather than herself. Tris has learned during her time in Dauntless how to be selfless and brave while still doing the best thing for herself. She has become a force to be reckoned with, tough despite her small figure and capable of making life-changing decisions confidently and facing her fears.
But she still has plenty of room to grow even more as a character; for one, she needs to learn what it truly means to sacrifice herself. She watched her mother do it for her, completely sure of herself at every second, giving herself up to the Dauntless soldiers out of love for her daughter. And yet, when Tris attempted to sacrifice herself for Tobias's sake when she gave him the gun in the control room, something was off. She wasn't doing it for the right reasons. Nothing would come of her sacrifice; the data for the simulation would not be extracted, and Erudite would continue to control the Dauntless and destroy Abnegation. Tobias would still be under a simulation. All of her living loved ones would have lost Tris for no good reason, because her death would have meant very little in the grand scheme of things. She would not have been sacrificing herself for a purpose; she would have been sacrificing herself because in the heat of the moment, it seemed the only way to get out of shooting her boyfriend.
This is why her sacrifice was unsuccessful; if Tobias had shot her and she'd died, then the story would not have been able to reach its resolution. So in this sacrifice she had to fail, both because it wasn't for the right reasons and because it's necessary that she remain alive to lead her companions in the fight against Erudite. Over the course of the novel, Tris has become a leader, and an agent in her own destiny. She will undoubtedly continue to lead the way throughout the next two installments of the trilogy.