The city, once a sanctuary of ordered factions, now lies fractured and bleeding, ruled by Evelyn Johnson-Eaton and her Factionless, who have dismantled the old system with an iron fist. Beatrice "Tris" Prior, alongside Tobias "Four" Eaton and their closest companions, finds herself navigating a treacherous landscape of shifting loyalties and simmering resentments. The revelation of Edith Prior's video, exposing their entire society as an experiment, has shattered every truth they once held dear, leaving them desperate for answers that lie beyond the city's walls.
A new rebellion, the Allegiant, rises from the ashes, determined to restore the faction system and fulfill the mysterious purpose hinted at in Edith's message: to send Divergent individuals outside the fence. Tris, Tobias, Christina, and others are chosen for a perilous expedition, an escape from the oppressive regime of Evelyn and the escalating violence within the city. Their journey past the long-forbidden boundary is fraught with danger, leading to the heartbreaking loss of Tori Wu, but ultimately, they are rescued by soldiers with advanced technology.
They are ushered into a world far grander and more complex than they ever imagined - the Bureau of Genetic Welfare, hidden behind a cloaking shield. There, David, the Bureau's leader, unveils the astonishing truth: their city, Chicago, is merely one of several experimental enclaves, designed to repair human genes damaged by a devastating "Purity War" that ravaged the planet generations ago. The Divergent, like Tris, are the culmination of this experiment, considered genetically pure, while the majority of the population inside the city are "genetically damaged." David even gives Tris her mother Natalie's journal, revealing her past as a refugee who joined the Bureau and volunteered for the Chicago experiment.
However, the Bureau's intentions are not as benevolent as they first appear. Tobias discovers that the Bureau is kidnapping children from the wasteland villages and wiping their memories, a chilling echo of the control they exert. He also learns of a plot to release memory-erasing serums on the population of Chicago to save their experiment, a plan David intends to carry out. This revelation sparks a deep distrust in Tobias, who struggles with his own identity, having been told he is not genetically pure.
As Tris delves deeper into the Bureau's operations, she finds herself entangled in the internal conflicts of this new society. Nita, a Bureau rebel, manipulates Tobias into helping her steal a death serum, intending to use it for assassination. Tris, however, is determined to prevent such a devastating weapon from being unleashed. She formulates her own desperate plan to expose the Bureau's actions and prevent them from resetting the memories of everyone in Chicago.
A harrowing confrontation ensues at the Weapons Lab. Tris, armed with the memory serum, faces David, who attempts to stop her. In a selfless act, she pushes through the death serum, which, remarkably, does not kill her, a testament to her unique Divergence. But as she prepares to release the memory serum, David shoots her. Tris succumbs to her wounds, her final moments filled with visions of her mother.
Back in Chicago, Tobias, Christina, and Peter return with antiserums, only to learn of Tris's death from Cara. Devastated and lost, Tobias nearly succumbs to the urge to erase his own memories of Tris with a memory serum, but Christina intervenes. Meanwhile, Evelyn, convinced by Tobias to avert further war, negotiates peace with the Allegiant, leading to her two-year exile and the promise of new leadership for Chicago. Peter, too, chooses to reset his memories, seeking a fresh start.
Two and a half years pass. Chicago reopens its walls, a city rebuilt and unified, where genetic purity no longer dictates worth. Tobias, now an assistant council member, welcomes Evelyn back from her exile. On a new Choosing Day, in a poignant act of remembrance and acceptance, Tobias zip-lines from the Hancock Building, scattering Tris's ashes over the city she died to save. He carries her memory, not as a burden, but as a testament to her sacrifice, finally accepting the future and finding solace in the enduring connections with his friends.