Far in the future, Los Angeles has been flooded and is ruled by the evil, totalitarian Republic. The most wanted criminal in this society is fifteen-year-old Day, a homeless boy who steals to survive and to help the poor, and undermines the Republic's war effort against the Colonies through vandalism. Day lives with his friend Tess in the poor Lake sector. Day occasionally checks in on his family, who believe he is dead (with the exception of his older brother, John). One day, he finds out that his ten-year-old brother, Eden, has been infected with a new strain of the plague, a disease that is currently wreaking havoc in the Republic.
Meanwhile, June Iparis studies and gets into trouble at Drake University. June is a fifteen-year-old prodigy who got a perfect score on her Trial, the test children take at age ten that determines what their job will be in the Republic. She is suspended for climbing a skyscraper near the campus. Her brother Metias and his driver, Thomas, take her home. Metias Iparis is a young captain in the military who has raised June since their parents died in a car accident several years ago.
Day breaks into Los Angeles Central Hospital to steal plague medicine for his family. However, the hospital is out of the cure and he can only steal the weaker suppressants. He is just about to get away when Metias, who has been sent to guard an important delivery, stops him. Day throws a knife into his shoulder and escapes. In his rush to get out, Day leaves behind his special pendant.
That night, Thomas comes to June’s house and tells her that Metias is dead. Metias’s former boss, Commander Jameson, arranges for June to graduate from Drake early so she can help catch Metias’s killer - Day. Although she is devastated by her brother’s death, June investigates the crime scene and concludes that Day was stealing the plague medicine for someone he knows. She spreads the word in the poor sectors that Day should come to the "ten-second place" if he wants to buy a plague cure. The ten-second place is a bank that Day robbed in a spectacular heist that took place in only ten seconds.
Day suspects this is a trap, but he goes anyway in hopes of getting the cure. He rigs the speakers at the bank so he can talk to June without giving away his location. They talk, and he flees when he sees the knot June tied her cloak with and realizes that she’s an agent for the Republic. June learns from his accent that Day is from the Lake sector. That night, Day and Tess discover a strange metal plate under a pier.
June, Thomas, and Commander Jameson interrogate a spy from the Colonies, a rival country on the other side of what is now the United States. June is appalled by how violently Thomas beats the prisoner. The next day, June disguises herself as a street urchin and goes to the Lake sector, hoping to get more information about Day. She stumbles into a Skiz fight - a street fight that onlookers can bet on. The crowd tries to coerce scrawny Tess into fighting, but June intervenes and gets pulled in herself. She beats Kaede, the previous champion. However, Kaede pulls out a hidden knife and stabs her. According to the rules of Skiz fights, a fighter must keep competing until they lose. Day rescues the wounded June from more fights by setting off a dust bomb. They escape and Tess nurses her back to health.
Over the next few days, June begins to enjoy Day and Tess’s company. She has a few intimate moments with Day, and they eventually kiss. Soon after the kiss, June sees Day reach for his pendant and she realizes his identity. She confirms his identity by following him when he sneaks off to visit Eden (who is getting sicker) and the rest of his family. She tells Thomas, who sends a large corps of soldiers to Day’s family’s house, hoping to lure him out. June sends him there, believing that the capture won’t be violent. However, Day tries to fight off the soldiers, and Thomas retaliates by shooting Day's Mom in cold blood. John and Day are imprisoned and Eden is sent to the warfront for an unknown reason.
In prison, June interrogates Day about Metias’s murder and his other crimes. While he admits to the nonviolent offenses, he insists that he’s innocent of the murder, and that he’s sure he only stabbed Metias in the shoulder. Although June is furious about Metias, she shows some compassion. She kept Tess away from the showdown at Day’s house to prevent her from being arrested, and she apologizes for his mother’s death. When Day is moved to a new cell, he sees a body bag marked with the plague symbol and wonders if the Republic is spreading the plague to its citizens on purpose.
June goes to an elegant ball to celebrate Day’s capture. Thomas takes her home and tries to kiss her, but June is repulsed by his violent personality. That night, she reviews Day’s Trial exam and realizes that like her, he got a perfect score. However, the records show that he failed and was sent to a labor camp where he died of smallpox at age ten. She realizes that the Republic falsified his score to get rid of him.
Day is sentenced to death, which inspires protests in the city’s military sector Batalla. Commander Jameson tortures him by forcing him to lie in the sun for two days. During this time, June brings him food and water and asks him about his early life. She is shocked when he tells her that children who fail the Trial are routinely killed, and that his records are wrong because he escaped after being taken to a lab for painful tests. He also tells her his belief that the Republic is purposely spreading the plague. June thinks this over. Meanwhile, hundreds of protesters gather outside Batalla Hall, the military headquarters. June is horrified when Thomas and Commander Jameson order them to be shot. When she tries to intervene, Thomas pushes her on the ground.
Thomas interrogates Day about whether he knows some spies for the Patriots, a resistance group affiliated with the Colonies. He only recognizes one - Kaede, the girl from the Skiz fight. That night, Thomas begs June to forgive him for pushing her. She ignores him and instead reviews the crime scene photos from Metias’s murder. She realizes that Thomas committed the murder, probably on orders from the government, and Commander Jameson covered it up. The next day, she visits Day and they make up.
June rereads Metias’s journals and finds a coded message that leads her to a blog. On the blog, Metias recorded his discovery that their parents were murdered. The government did this because their father found out that the Republic uses the plague to eliminate weak genes from the population. In the final entry, he writes that Thomas found out what he knows. June reflects and then decides to help Day escape. Day tells her that Kaede is a Patriot, and June goes to her for help. They plan to create a diversion and use Patriots dressed as soldiers to free John and Day on the day of the latter’s execution. However, Commander Jameson moves the date up, preventing them from carrying out the rescue as planned.
June tries to rescue them on her own, but Thomas stops her when he finds that an electro-bomb - a bomb that disables guns - is missing. June stole the bomb and gave it to Kaede for use in the rescue. Just as Thomas is about to realize June is guilty, the Patriots show up and set off the electro-bomb, starting a riot among the people who have turned out to watch the execution. June uses the chaos to rescue Day and John. However, Day has been hit on the head and can’t walk. John sacrifices himself so that June and Day can escape with the Patriots, who take them away on motorcycles. The Patriots drop June and Day off in Valencia, on the outskirts of the Republic. They decide to go to Las Vegas, a Colonies stronghold, to check on Tess, who has joined the Patriots. After that, they will go to the warfront to rescue Eden.