Picking up shortly after the previous film, 'Insurgent' left off, now that Jeanine is dead, Evelyn (Naomi Watts) has assumed control of Chicago and is placing everyone in Erudite that worked for Jeanine on trial, while also sealing off the gates to the rediscovered land outside the city.Tris (Shailene Woodley) and Four (Theo James) watch as Max (Mekhi Pfeiffer) is the first to go on trial. Most of Evelyn's followers demand that Max be executed, while those that follow Johanna (Octavia Spencer) think he ought to be spared. Kang (Daniel Dae Kim) gives Max the Candor truth serum. Max shows no remorse for killing people under Jeanine's orders, and he compares people to sheep that get slaughtered if they stray from their shepherd. Evelyn listens to the people and has Edgar (Jonny Weston) shoot Max in the head. Caleb (Ansel Elgort) is on trial next, and he fears for what they'll do to him. Johanna is booed out with her followers for disagreeing with Evelyn's verdict.Four goes against his mother, saying there was no point in going to war with Jeanine when Evelyn just became her.Tris and Four plot to break Caleb out. Four orders Evelyn's guards to release Caleb to him. Four takes him outside and throws him into a ditch before taking out his gun and pretending to shoot Caleb. The guards leave, and Caleb comes out of hiding.The three of them, along with Christina (Zoe Kravitz) and Tori (Maggie Q) plot to break out of the city. Peter (Miles Teller) comes along so that he won't rat on the group. After fooling Evelyn's guards, the group heads toward the wall, but one of the guards alerts Edgar to their plan.As the group reaches the wall, they shoot their grappling hooks and use the wires to scale the wall. However, the fence on top of the wall is electrified. Tris goes down the wall with Four following so she can destroy the electrical box. Edgar and his boys show up and start shooting at the group. Four holds them off as Tris places a bomb on the box. As they run back to the wall, she detonates it, blowing up the box and killing some of the goons. Tris and Four run back up the wall. Tori is shot and killed by Edgar, and Tris is forced to leave her behind.Once they make it further away from the city, they discover that the land has been mostly burnt out and become a toxic wasteland. The rain that falls on them is red. A van rolls in above the group... it's Edgar. They run for it and reach a point where a wall to another city appears to open up, revealing vans and aircraft. A squad of soldiers take the group in and blast Edgar's van away.The group is taken in plasma bubbles to a facility known as the Bureau of Genetic Welfare. They are decontaminated and have a bar code printed onto their skin, but all with different coding. A video shows the group an explanation of what happened to the world. Many generations ago, a hopeful miracle drug was created, but it naturally spun out of control and led to chaos around the globe, leading the survivors to form the Bureau and strive to fix things.Tris is taken to meet the Bureau's director David (Jeff Daniels). He considers Tris a miracle, as she is what the Bureau considers "pure", while the others, like Caleb and Four, are "damaged." David has also been watching everything that goes on around the city, which explains how he knows Tris and what she's been through, as well as everything that is happening in the city now. David gives Tris a device that allows her to see the memories of her late mother Natalie (Ashley Judd) from when she was a child living in The Fringe, the isolated area where the infected roam and attack survivors. Natalie was saved and later worked with David to establish the Faction system.Four is assigned to a woman named Nita (Nadia Hilker), who teaches him how to use target drones for combat. Peter and Caleb are put on surveillance duty to observe what goes on around the city.Caleb observes Evelyn and her henchmen meeting with Johanna and a few of her followers, which have called themselves the Allegiant. The two leaders are prepared for a war, which is instigated by Edgar after he shoots one of Johanna's followers.Four is on duty with the other men on his team. They go into The Fringe and accidentally kill the father of a young boy. The boy and other survivors are brought in and supposedly decontaminated with a special gas. However, Christina notes to Four that the boy has forgotten his father and his own name.David takes Tris to Providence, a clean and dystopic city structure where all the privileged folks live. Tris appears before a council to go along with David's plan to cleanse the world, but she rejects the notion that they should classify some as pure and others as damaged.Four is apparently sent to The Fringe with one Bureau worker, Matthew (Bill Skarsgard). However, Matthew tips Four off about the Bureau's true intentions. He fights the goons on board and crashes the ship. Four escapes and tells Matthew to tell Tris and David that Four left him behind, because Tris will know that's a lie. Four is eventually captured and taken back into the city.David sends Peter back into the city to deliver the gas to Evelyn, claiming that David is a personal friend. Peter suggests using it on the Allegiant so that Evelyn may retain control over everyone. She tests it out on her ex-husband Marcus (Ray Stevenson). With a heavy dose, Marcus literally watches his mind deteriorate and his memories disappear, leaving him with no idea who Evelyn is or was to him.Knowing that something bad is gonna happen, Tris steals David's hovercraft and gets Caleb and Christina to head back into the city. Nita gives them some weapons because she hates David too. The three fly away and are pursued by David's henchmen. They try to bring Tris down gently, but she attempts to manually fly the ship, nearly crashing it until they are able to go beyond the camouflage wall.Tris and Christina make it into Evelyn's facility where she plans to release the gas unto the Allegiant, unaware that it will go throughout the entire city. Tris reunites with Four while Caleb is outside on surveillance. Evelyn begins to release the gas until Four tells her that it will affect both of them, and he won't know who his mother is. She has a change of heart and tries to stop it, but Peter shoots her in the back and allows it to continue, until the gas reaches the room he's in. He frantically tries to stop it but can't.The gas starts spreading into the city, hitting some of the Allegiant. Tris runs down to the main control room, but David, who is still watching, tries to hold her off. Tris uses the drones to find the main power grid for the gas and blasts through the wall to ultimately destroy it. David yells in defeat while the gas stops spreading.Tris sends a message to everyone in the city, saying that they are neither pure nor damaged, but that they must stand united as one city against their oppressors. Tris leans against Four, thinking everything is fine... not knowing David is still watching and planning something sinister.