Five days after the assault on the Abnegation faction by Erudite leader Jeanine (Kate Winslet) and her mind-controlled Dauntless soldiers, Jeanine has declared martial law and that the Divergents – those with the qualities of multiple factions – and those allied with them are the enemy. Among the Abnegation wreckage, Dauntless leader Eric (Jai Courtney) and his platoon recover a five-sided box: each side has a faction symbol. Jeanine presumes it contains data from the city’s founders and the means to end the Divergence problem. As only a Divergent is capable of opening the box, she orders the capture of all Divergents.
Tris (Shailene Woodley), Four (Theo James), Peter (Miles Teller), and Caleb (Ansel Elgort) hide within the Amity compound. Soon after, Eric and his fleet arrive to test all the occupants for Divergence. Peter gives up the group’s location as Tris, Four, and Caleb escape and board a train headed into Factionless territory. After fights with the Factionless aboard, Four reveals his name–Tobias Eaton–which prompts the Factionless to stand down and reply that they have been searching for him.
Four, Tris, and Caleb are given amnesty at the Factionless hideout. There, Tris and Caleb discover that the Factionless leader is Four’s mother, Evelyn (Naomi Watts). She suggests that Dauntless and Factionless should ally against Erudite, but Four declines. The next morning, the three leave Factionless for Candor to meet up with the remaining Dauntless; during the trek, Caleb tells his sister Tris that he cannot continue with them and goes in a different direction. Upon arrival, Tris and Four are arrested and brought before Candor leader Jack Kang (Daniel Dae Kim), who intends to deliver them to Jeanine. However, Four pleads for Jack to conduct a trial in Candor with the use of truth serum. During the trial, Four communicates his motives and is absolved. Tris tearfully admits her guilt in shooting and killing Will, which angers Christina.
Candor is attacked by the Dauntless who have sided with Eric, and many people are shot with pellets of new simulation serum. Tris is captured by Eric who learns she has a Divergence reading of 100%, making her the perfect subject to open the box. Eric arrests Tris, but Four and the Factionless allies arrive to save her. After a brief exchange, Four shoots Eric in the head for the murder of hundreds of people. Back at Erudite, Jeanine, frustrated that none of the Divergent subjects have survived the simulation trials required to open the box, is approached by Peter, who pledges his loyalty to Erudite, and suggests the best way to get Tris to surrender is by exploiting her humanity.
Back at the Factionless base, Four reluctantly agrees with Evelyn that war is inevitable and that they need to prepare. Jeanine activates the pellets, causing Christina, Marlene and Hector to repeatedly chant that Tris must turn herself in or more death will follow, as they step closer and closer to the edge of a tall structure. Tris and Tori then climb the sides of the roof as Tris rescues Christina and Tori, Hector. However, Marlene plunges to her death. Overcome by guilt, Tris decides to turn herself in. That night, she and Four sleep together, and then she quietly slips away.