That night, Tris wakes up to find all the other initiates in her dorm getting out of bed in unison and getting dressed. They are in a trance-like state, and she can't wake them. She follows them aboard the train to the Abnegation section of the city. She realizes the serum they received contained transmitters, and the transmitters are connected to a mind-control program. The Erudite developed the serum and the simulations, and the Dauntless leaders are working with Erudite. She is not under the mind control like all the other Dauntless because she is Divergent. She finds Four, who is also awake and pretending to be in a trance. He is Divergent as well.
When they get to the Abnegation sector, they see mind-controlled Dauntless shooting Abnegation members in the street. After a confrontation with a Dauntless leader, Tris is shot in the shoulder, and Eric and Dauntless soldiers capture Tris and Four. They are taken to the Erudite leader who tries a new serum on Four, one made especially for the Divergent, and it turns him into a mindless killer as well. Tris is left to drown in a tank rapidly filling with water, but her mother rescues her. She tells Tris where her father and the other Abnegation are hiding. She distracts soldiers so Tris can get away, but in the process, Tris' mother is killed.
Tris finds her father hiding with her brother and Marcus, Four's father. They agree to go back to the Dauntless compound to find the computer running the mind-control simulation and destroy it. When they get to Dauntless, they find another initiate, Peter, willingly guarding the facility; he is not under any mind control. Tris shoots him in the arm to get him to tell her the location of the computer. Leaving a wounded Peter with Caleb and Marcus, Tris and her father find the computer room and encounter several guards along the way. Her father shoots them, and in the fight, he is killed. Tris finds Four in the computer room monitoring the simulation. She knows she can't shoot him or beat him in a fight, so she reasons with him, hoping that because he is Divergent, he will be able to break free of the simulation, and he does. They stop the computer program and remove the data. The Dauntless group, no longer under mind control, realizes what they have done.
Tris reunites with her brother, and Four faces Marcus for the first time in more than two years. Tris warns Marcus to stay away from Four. They take a train to Amity Headquarters to seek refuge.