In "Allegiant" by Veronica Roth, the faction system is overthrown, Evelyn Johnson takes control of the city, the city is revealed to be a genetic testing ground and Tris is killed while Four lives. The book takes several turns many readers do not see coming.
The faction system is destroyed because of the video that Tris makes public. In the wake of the faction system collapsing, Evelyn Johnson takes control of the city. She is the leader of the factionless, as well as the mother of Four.
A rebel group called The Allegiant escape the city and discover that there is a group of people who have been monitoring the city. The group is concerned about the genetic purity of the people within the city. They have essentially been using the entire city as a testing ground to see if genetic deficiencies can be eliminated.
Tris and Four become involved with a rebellion against this group. During the course of the raid against the scientists, Tris is trapped in a room with the death serum in gas form. She is able to overcome the effects of the serum but is shot and killed moments later by one of the lead scientists.
The experiment is revealed to everyone in the city and the experiment is ended along with the faction system. Months later, Four goes zip-lining with a group of friends and spreads Tris' ashes over the city.