In the Society, everything for the citizens is decided by the government: where they work; who they love; when they die; all of it is scheduled and planned based on statistics and probabilities that guarantee them the best possible life. Nobody can write, or draw, or create anything that does not already exist. One hundred of the “best” poems, paintings, songs, and stories are all that remains of the culture we know today, preserved so as to give everyone just enough information to not be overwhelmed. Every citizen has one job -- cooks do not learn about biology and data sorters do not partake in nutrition disposal. People eat the pre-approved meals delivered by the government. They play pre-approved games. At night, there is a mandatory curfew. At age 17, each citizen enjoys a Matching Banquet in their honor, where they are paired for life with an assigned partner, with whom they will marry, have children, and grow to age 80 together. At that point, following a ceremonious Final Banquet, they die a scheduled death.
At the book’s opening, Cassia Maria Reyes is on her way to her own Matching Banquet at City Hall with her best friend, Xander Carrow. She holds a golden compact, her artifact, which was a gift from her grandfather. Each citizen is allowed exactly one such artifact. At the Banquet, an extravagant spectacle with lavish food and drink, 17-year-olds in attendance are to be Matched with their life partners, most of whom are attending their own Banquets in other Cities. They are displayed to one another on a screen when they are Matched. When it is Cassia’s turn, she is Matched to Xander, to her elation.
Cassia and Xander are given standard microcards, which contain extensive information on each of them so that they can learn about their life partner. On the ride home, they hold hands for the first time. Cassia has a younger brother named Bram, and when they arrive home, he teases her about being Matched with Xander.
The next day, on the train to work, Cassia and the other passengers are bewildered by what appears to be snow in June. The flakes turn out to be Cottonwood seeds from a nearby grove, which is being torn up to make room for more efficient trees. Cassia pockets one of the seeds. By vocation, Cassia is a data sorter, a person who finds patterns in various data streams and sorts it categorically. She is one of the best sorters and rarely makes mistakes.
When Cassia gets home from work, she makes use of her alone time to look at her microcard on the kitchen port, a screen that watches the family at all times. However, when she inserts the microcard, it malfunctions, displaying first Xander’s face and name, and then suddenly another boy’s, before going blank. Cassia is dumbfounded.
She and Xander attend free-rec hours at a game center that night. There, Cassia is pulled aside by an Official who assures her that the microcard malfunction was a mistake, that she is still Matched with Xander, and that she should forget about the other boy on the screen. Cassia admits to knowing the other boy: Ky Markham, a friend of hers. The Official replaces her microcard with a new one and informs her that Ky Markham is an Aberration—a citizen of lower status, whose his father committed an Infraction, before he and Ky’s mother died and Ky was adopted into a new family. Aberrations can never be Matched. Rather than have a meeting arranged with her family and Xander about it, Cassia decides to only tell one person about what happened: her grandfather, whose 80th birthday is the next day. The Official sanctions this.
Cassia flashes back to a memory of her and Xander at the pool when they were younger, when Xander lost his tablet container—a small container with one blue tablet, one green tablet, and one red tablet, which every Society member must carry. The blue tablet can keep a person alive for days without food. The green one, which can legally be taken weekly, calms someone who needs calming. The red one has a purpose unknown to everyone. When Xander went to look for his container, Ky Markham thought he was drowning and dove in to save him. Xander found the container, and both boys resurfaced unharmed.
Back in the present, Cassia visits with her grandfather and tells him about her microcard malfunction. Her grandmother died of a form of cancer, since eradicated, when she was 62. Her grandfather is upset at the news of the malfunction, especially when he learns that Ky is an Aberration. He asks Cassia to bring her compact to his Final Banquet the next day, and tells her that it’s okay to wonder about which boy she should be Matched with.
The next day, Cassia and her family attend her grandfather’s Final Banquet at his home. They each bring him a gift. Cassia’s is a letter that she wrote and printed on her home port. Her grandfather has qualified for tissue preservation, so they take a cheek swab from him for delivery to a preservation facility. Other guests then come to say goodbye. When they leave, her grandfather speaks with each of the four family members individually. Cassia is last to speak with him. He likes her letter, but acknowledges that they’re not Cassia’s words. Dejected, she gives him the Cottonwood seed from the day before. He opens her compact and shows her a secret paper inside, which he reads to himself, and puts back without showing Cassia. He dies peacefully soon after.
A week later, Cassia and her friends see a showing—i.e., a movie—with Ky. When the movie ends with gruesome death scenes, which Cassia and Xander think are comically fake, Ky cries. The following Monday, Cassia sees Ky at the Arboretum for hiking, her summer leisure activity. The hikers must race up a large hill to the top. In the woods as she hikes, Cassia hides and reads the secret paper in her compact. It contains two forbidden poems, one of which is Dylan Thomas’ “Do not go gentle into that good night.” She reads them several times and then heads to the top of the hill, where she finds Ky. Ky admits to seeing her in the woods, and asks whether she wants help destroying the paper. She says she’ll do it herself.
At home that day, Officials search Cassia’s house because her father lost the tissue sample for her grandfather’s preservation. They reprimand him before being shooed out by her mother so that the family can eat dinner. Cassia is shocked and hurt that her father lost the sample, but she is also relieved that the Officials didn’t find her forbidden paper.
The next day, Cassia goes to her father’s work site, where he oversees the restoration of old neighborhoods. On this day, he is supervising a group of workers who are destroying illegal books at an old library. She lets the paper fall to the floor, making it appear to be part of the refuse. A worker, who thinks it’s from a library book, destroys it. She then goes to school, where she learns that her friend Piper has received her permanent work assignment and won’t be coming back to school. She knows that this will soon happen to herself and Xander, too.
At work, Cassia learns that Officials administer a test to her. When she comes home, her father admits to her that he didn’t lose her grandfather’s tissue sample -- he destroyed it at her grandfather’s request. Cassia is furious.
Later that week, Cassia, Xander, and their friend, Em, plant flowers outside the First School. Cassia tells Em that she can borrow her compact for her upcoming Matching Banquet. Though Cassia feels like they’re creating something beautiful by planting the flowers, she knows that they’re only doing what the Society is allowing them to do, using pre-approved pieces provided to them, and this upsets her. She also thinks frequently of Ky. While sharing compensatory ice cream afterward, she and Xander share their first kiss, and she feels sure that she was meant to be Matched with him.
Cassia performs excellently on her supervised test. The Officials tell her they’ll have their eye on her. That night, awoken by a nightmare about the red tablet killing her friend Em at Em’s Matching Banquet, she learns that her mother is being called away for a week on a work-related errand. Cassia then overhears her parents talking in their room and learns that her mother doesn’t know that father destroyed her grandfather’s tissue sample. She questions their perfect Match, and by extension, her and Xander’s. At school the next day, Cassia learns that Em gave Ky her compact to give back to her, which he didn’t do.
When Ky and Cassia next hike together, Ky slips a strange device Cassia doesn’t recognize into her hand—a compass. When they are alone on the hilltop, she learns that he can write, and she asks him to teach her. He agrees, and they begin a daily routine of learning new letters during their brief alone time at the top of the hill. Cassia wants to learn to write down the forbidden poems she has in her memory. The following day, Ky slips a napkin into her hand. At home, she sees that he’s drawn and written on the napkin, illustrating his life before and after his adoption. Later than night, Ky returns her compact to her in an envelope as he heads home.
Days later, while hiking, Cassia sees Ky seemingly teaching a girl named Livy to write. Cassia is jealous and hurt, and doesn’t approach them. That night, she goes on an arranged, supervised date with Xander, on which she feels privately guilty because she thinks she’s falling in love with Ky. When they arrive home, Officials are confiscating everyone’s artifacts because they “promote inequality.” Cassia gives Xander Ky’s compass to hide. Officials confiscate her compact and the watch that her grandfather gave Bram. In the envelope that Ky gave her, Cassia finds another napkin with an illustration on it.
Cassia and the other hikers have moved to the Hill, a larger and wilder site in the Arboretum, to mark obstacles in preparation for a path being paved there. She and Ky are paired for the task. In the woods, Ky clarifies that he was lying to Livy about what he and Cassia have been drawing in the dirt. Reassured, Cassia recites one of the forbidden poems to him, and they begin saying it back and forth to one another. He gives her another napkin.
Cassia’s mother arrives home, but says that what she was doing on her trip is confidential. Cassia looks at Ky’s most recent napkin in private. On it, he drew a sky filled with ammunition, and a depiction of him metaphorically losing his parents. That night at the game center, Xander challenges Ky to a game of chance, at which they tie. Xander tells Cassia privately that he thinks Ky loses on purpose. They play a second game, one that demands skill rather than luck, and Ky does just that.
Cassia’s mother is called away on a second work-related trip. While hiking, Ky tells Cassia the tale of Sisyphus, a man who outsmarted and killed an Official, who was punished by having to push a rock up a mountain, never reaching the top. As they build a cairn, their hands intwine, and Ky admits his Aberration status to her, thinking that she doesn’t know about. He says if he could be Matched, he would be Matched to her.
Cassia is called out of class for having committed an Infraction, which turns out to be a mistaken announcement, as she is only visited by an Official to warn her about getting too close to Ky, lest she and he be punished. The next day, all the maple trees in her neighborhood are cut down because they weren’t growing uniformly. Her mother thinks it’s a warning for herself, but Cassia thinks it’s a warning for herself. At hiking, Ky gives her a part of a forbidden poem that he acquired. She is overwhelmed. They embrace and he kisses her cheek.
Cassia keeps the relationship between her and Ky a secret, even holding Xander’s hand in public. While hiking, Ky tells her that there are Archivists at the Museum who hold onto forbidden poems for buyers to acquire, if they know how to do so. They destroy Cassia’s birthday gift from Ky by burying part of it and tearing another part to shreds on the breeze. She writes I love you in the dirt, and he says it out loud back to her.
Cassia’s work unit is called upon to do a real-life sort that turns out to be at the nutrition disposal center where Ky works, during Ky’s shift. She must sort the workers into categories of better and worse, knowing that the better workers will be taken away to an unknown new vocation, while the worse ones will stay behind and receive longer work hours. When she has the epiphany that the Society poisons the elderly’s food, she sorts Ky into the better category to get him out of there, even if it means leaving her.
Cassia’s mother tells Cassia that her business trips were to investigate the growth of illegal crops in other Provinces, which she has now truthfully reported. She also lets on that she knows Cassia has feelings for someone other than Xander. While hiking the next day, Ky tells Cassia that Officials approached him a while back to say he was accidentally Matched with her. Shocked that he knew what she thought was a secret, and horrified that their relationship may have stemmed from actions taken by the Society, she runs from him. Later, at school, she confesses her feelings for Ky to Xander, who storms out, angry and hurt.
On their last day of hiking, Cassia and Ky defy the rules and climb to the top of the Hill. He gives her his compass and a piece of paper, and she gives him the piece of preserved fabric from her Matching Banquet dress. They finally share a kiss.
The next morning, Ky is taken away in handlocks by Officials as his mother screams, causing a scene. Cassia chases after him, and an Officer restrains her. Her father intervenes to stop him. Ky’s father declares that, despite the Society’s false claims of a new vocation, Ky has been taken to fight on the war front against the Enemy. Everyone is instructed by the Officials to take their red tablets, which causes them all to forget everything that happened in the last 12 hours. Cassia fakes taking hers, which her Official secretly knows and allows.
Later that day, Cassia’s mother receives news via port that the whole family has been relocated to the Farmlands of a different Province, to their horror. Cassia goes to visit the City’s Museum, where she talks momentarily to a secret Archivist about where Ky might have been taken. When she leaves, she sees her Official, and they discuss her relationship with Ky. Cassia realizes that, despite their lies, the Society still doesn’t know who entered Ky into the Matching pool.
Back at home, Xander confesses that the red tablets work on neither him nor Ky, and that he remembers the events of that morning. He discovered this once when he and Ky both took red tablets at a younger age. He then gives Cassia a package of extra blue tablets for her upcoming journey. She thanks him, but denies him a final kiss.
On the train to their new home, Cassia’s father admits to knowing about the war, and knowing that Cassia is in love with Ky. He offers to help her find him. When they arrive, her parents recommend Cassia for a three-month work detail to cure her “rebellious” behavior. She is sent to do hard labor in a Province where the Sisyphus River might lead her to Ky. As she works, she holds onto his memory and the paper he gave her, where he drew himself reaching for her, under which he wrote I love you. She knows she will see him again.