Tally Youngblood is one of the last uglies in her community to undergo the mandatory plastic surgery that turns sixteen-year-olds into pretties, people whose appearance has been altered to reflect her culture's beauty ideal.
According to her society, this operation is intended as an equalizing force. It levels the playing field between people; with nearly identical appearances come nearly identical survival rates.
While waiting out her last days as an ugly, Tally befriends Shay, whose negative view of the surgery leads her to run away the city to the Smoke, a settlement of people who have successfully evaded the operation and are living in the wild.
On the morning of her surgery, Tally is taken to a secret underground bunker, where Dr. Cable—a Special, or a pretty who has been surgically altered to have superhuman abilities and terrifying facial features, whose job is to ensure the continued existence of the current regime—threatens to withhold Tally's surgery unless she follows Shay to the Smoke and betrays its location. She gives Tally a locket to activate once she has arrived, and promises that if Tally is successful, she will still receive the surgery.
Following a coded note from Shay, Tally journeys to the Smoke, where she makes friends with its inhabitants and falls in love with the child of its founders, David. David brings Tally to meet his parents, Maddy and Az, who inform Tally that there is a secret behind the operation, one kept from the larger population. The surgery might make one beautiful, but it also inserts lesions into the human brain that render one unintelligent and docile. This is how the society keeps peace.
Tally's world is rocked by this revelation and by her feelings for David, the first ugly who Tally finds beautiful. Ultimately, she throws the locket given to her by Dr. Cable into the fire, intending to destroy it once and for all.
The next morning, Tally wakes to find that Specials have invaded the Smoke. She is informed by Dr. Cable that the locket sent an automatic signal to the Specials when Tally incinerated it. It is her fault that the Smoke has been destroyed.
Tally narrowly escapes the Specials and finds David hiding out in a nearby mountain. Together, they hatch a plan to rescue others, including Shay and his parents, from imprisonment by the Specials in their underground bunker. They liberate the prisoners, but arrive too late to help Shay and Az. Az is dead and Shay has been turned into a pretty.
In the ruins of an old city, the escapees begin to rebuild their old way of life. Maddy finds a cure for the lesions and attempts to give it to a brain-addled Shay, who refuses. Tally, feeling a deep sense of responsibility for what she has done, confesses to David and volunteers to give herself up, so she can undergo the surgery and, once she has been rescued, become a test subject for the cure. The novel ends with Shay and Tally returning to the city, where Tally presents herself to the Specials for surgical alteration.