As construction of the city of Ember concludes, its chief “Builder” and his assistant discuss the future. They are unsure of what will follow but, without revealing why, determine that the city’s inhabitants need to live there for at least 200 years. So that Ember’s future citizens will know what to do at that time, the chief then reveals a grand plan: They will provide Ember with instructions, sealed inside a box with a timed lock set to open on its own at the right date. Sworn to secrecy, only the city’s mayors, one after the next, will know about the box and its hiding place in Ember’s Gathering Hall. None will know what is inside the box, only that the contents contain critical information for Ember’s people.
All goes according to the Builders’ plan until an immoral mayor, the city’s seventh, takes possession of the box. Plagued with a coughing sickness, common in Ember at the time, he brings it home, hoping to find a cure that will save him. Although he fails to open the box, he damages it. After the corrupt mayor dies, the box ends up in a closet. The box remains there for generations, until finally clicking open at the programmed time.
It’s year 241 and Ember is old, in disrepair, and dark. With no natural light, its only illumination comes from light bulbs and streetlamps. Electricity shuts off nightly, and power outages, which result in blackouts, are common during the day. Children attend school until they are twelve years old. On Assignment Day the children enter the adult workforce.
At Ember School, Mayor Cole arrives with a bag holding the fate of all twenty-four students in the graduating class: the job they will do for the next three years. Lizzie Bisco stands first and draws Clerk at the Supply Depot, whose underground storerooms contain all of the city’s supplies. Lina Mayfleet disappointedly draws Pipeworks Laborer, which means she will repair pipes below the storerooms. Doon Harrow hopes for Electrician’s Helper so he might fix Ember’s electrical problems and save the city, but he draws the job of Messenger and throws his piece of paper in anger. Scolded by the mayor, Doon rants about the state of Ember with its blackouts and supply shortages. Later, in Harken Square, Doon and Lina trade jobs. As Messenger, Lina gets the job she had first wished for, and Doon feels happy because he will have access to Ember’s generator, which creates electricity from an underground river.
Lina runs home, happy about her job, but as she passes unlit streetlamps, feels dread while recalling a rumor about Ember’s dwindling light bulb supply. Lina’s Granny and baby sister, Poppy, are her only family now that her parents have died from the coughing sickness ravaging Ember. Their cluttered apartment above Granny’s yarn shop is decorated with Lina’s drawings of a city filled with light, one born from her imagination despite teachings that beyond Ember, there’s only darkness.
Later, Lina starts her job as Messenger, reporting to Captain Fleery and delivering messages for Ember’s citizens. Near Garn Square, she passes a group of Believers singing hopeful songs. Later, she delivers a message from Looper Windly, a young man who walks with a lurch, to Mayor Cole in the Gathering Hall. Portraits of Ember’s mayors, including its seventh—her great-great-grandfather, Podd Morethwart—line the walls. As Assistant Guard Barton Snode fetches the mayor, Lina wanders to the roof, hoping to see into the Unknown Regions, but glimpses only blackness while causing a commotion below. After Chief Guard Redge Stabmark catches Lina, the mayor scolds her for trespassing but, upon receiving her message, smiles strangely and decides not to punish her.
Doon begins his new job at the Pipeworks. Donning an old slicker and boots, he descends a deep, damp stairway leading to the Main Tunnel. There, he encounters Ember’s raging underground river for the first time and begins to mentally map the Pipeworks’s vast, labyrinthine layout. At its west edge, he watches the river vanish into a dark opening in a wall. At its east edge, he sees the chasm from which the river surges into the Pipeworks, along with a locked room housing Ember’s generator.
While patching pipes, Doon also realizes that Ember is in worse shape than he thought, so he determines to get into the locked room. When he does, though, he discovers that his understanding of how the generator works is as limited as that of his coworkers. Later, Doon’s despondency turns to anger at home, but his father convinces him to stay vigilant at work and pay close attention to everything he sees. And because Doon is fascinated by bugs, his father, Loris, recommends he keep an eye out for interesting insects. But Doon regards this as silly. Doon hopes instead that his work in the Pipeworks will lead him to something that will help save the city.
Lina finds Granny tearing up their couch while looking for something she had heard that her grandfather, Ember’s seventh mayor, lost long ago. Later, Lina’s work takes her to the greenhouses, which stand near trash heaps at the city’s southeast edge. Lina is delighted to deliver a message to its manager and her friend, Clary, but sad because the greenhouses remind her of her father, who worked there before he died.
Lina learns from Clary that a new disease has infected Ember’s potatoes, one of the city’s food staples. The two then hear loud sobs from Sadge Merrall, who is in great distress after attempting to venture into the Unknown Regions. While searching for something that might help the city, Sadge encounters only immense darkness that fills him with fear. Sadge tells Clary and Lina that the Unknown Regions will never be penetrated without a portable light source, something that doesn’t exist in Ember. As Clary and Lina discuss mysteries about Ember’s Builders, the Unknown Regions, and where they came from, Lina tells Clary about her imagined city of light. Lina stresses that the city feels real and that she believes there’s a hidden doorway that leads out from Ember.
Granny’s aging mind grows more muddled, so Lina has Mrs. Murdo, their neighbor, keep her company. Lina visits a store on Night Street, run by Looper, that has colored pencils, a rare commodity in Ember. There, she buys two, one green and one blue, but loses Poppy. As Lina searches for Poppy in surrounding streets, a blackout, the longest in Ember’s history, consumes the city. When the lights return, Lina finally finds Poppy and learns that Doon kept her safe in his father’s shop during the blackout.
In response to the blackout, citizens attend a meeting in Harken Square. Mayor Cole attempts to calm the crowd, saying those in power are managing the problem. But the townspeople sense he is lying. They grow angry and yell and surge at him as he escapes into the Gathering Hall. After the meeting, Doon rails about the mayor’s lies, but his father advises him to learn to master his anger. At home, Lina finds Granny ransacking a closet, from which she’s unknowingly dislodged a beautiful but damaged box with a mechanized lock and opened lid. Nearby, Poppy chews and rips up a piece of paper lined with perfect printing.
Lina studies the paper scraps and concludes the original note must have come from the Builders and the box must be the lost item Granny was seeking. Although Poppy destroyed much of the message, Lina’s able to make out a seven-step list of instructions. Many of its words are now missing, but Lina regards the message as a mystery and determines to solve it, believing the message could help Ember.
At work, Lina invites Captain Fleery to her apartment, where Captain Fleery reviews the message, only to dismiss it as unimportant. Captain Fleery then reveals she is a Believer: someone who thinks the Builders will return to save the city. At the Supply Depot, Lizzie tells Lina about Ember’s supply shortages and that only Mayor Cole and Farlo Batten, who is in charge of the storerooms, have access to reports on light bulb and vitamin supplies. After Lizzie shows no interest in the message from the box, Lina writes to the mayor, notifying him of her find, but she receives no reply. As Lina studies the broken message more, slowly filling in words such as river and door, she realizes the message pertains to the Pipeworks and that kind, curious, observant Doon is the right person to help her fill in the blanks.
Doon uses his spare time at work to explore the Pipeworks. At its south end, he finds Tunnel 351, closed with a rope and sign reading “Caved In. No Entry.” Disobeying the order, he enters the tunnel and finds a small ceiling hatch, likely leading to the storeroom. At the tunnel’s end, he finds a locked door. In the place where the river leaves the Pipeworks, Doon sees wrinkled rocks with grooves that resemble writing. Later, Doon hopes to gain insight on inventing a portable light, so he visits Ember Library, where he encounters Lina.
At Lina’s apartment, Doon spies her drawings, the box, and its fragmented instructions. As he reads important words such as open, follow, and door, Doon recalls the locked door in Tunnel 351. The two visit the Pipeworks the following day, where they hear someone enter Tunnel 351 from its ceiling hatch and then open the locked door. Doon and Lina determine that the man, who walks with a lurching gait that Lina finds familiar, must have discovered the way out of Ember. They believe the man will reveal his discovery to the city, so they decide to stand by for an announcement.
Lina attends to Granny, who is sick with a fever but relieved when Lina tells her she has found the lost object. Later, when Lina draws her imagined city, in color for the first time thanks to her new pencils, she colors a blue sky despite never having seen one before. That night, Granny grows more ill and dies in her sleep.
Lina is comforted when Mrs. Murdo invites her and Poppy to move in. Lina later sees Lizzie leaving the Supply Depot carrying a sack. When Lizzie falls, out roll cans of applesauce and other coveted goods no one has seen in years. Though Lina accepts Lizzie’s gift of creamed corn and peaches, she grows concerned and confronts her friend about what she saw the next day. Lizzie reveals that her new boyfriend and storeroom worker, Looper, explores forgotten rooms in search of rare goods. Lina’s concern grows when she realizes he also sells them in his store. Lina is tempted by Lizzie’s offer to give her more, including colored paper and shoes, if she keeps things secret but ultimately declines. She tells Lizzie that it is wrong that a select few should possess such precious goods while others go without.
Doon revisits the closed door in Tunnel 351 and finds a key left in its lock. Inside, he sees a brightly lit room filled with food cans, clothes, light bulbs, and other supplies. He also spies a cozy living room where Mayor Cole, overweight and stuffed with food, dozes in an armchair. Doon shares his discovery with Lina, who in turn reveals her findings about Lizzie and Looper, including her recent revelation: The mysterious man with the lurching gait in the tunnel must be Looper. And, based on the message he asked Lina to relay on her first day of work, he is conspiring with the mayor. Believing the evidence will lead to the mayor’s arrest, Lina and Doon head to the Gathering Hall and tell Assistant Guard Barton Snode, who conveys their news to his fellow guards just as Lina and Doon leave the hall.
Lina visits the greenhouses to tell Clary about the instructions and that Mayor Cole has been hoarding the city’s supplies. Later, in Lina’s bedroom, Clary sees the instructions and believes that Egres in the title must mean “Egress,” a way out. Buoyed by Clary’s discovery, Lina and Doon pore over the message, filling in more of the fragmented and missing words. In step 2, they piece together information about a stone marked with the letter “E,” believing it must stand for “Exit.” In step 4, they conclude that a “door” and its “key” can be found by the river’s “ledge.”
Closer to solving the puzzle, Lina and Doon agree to work quickly and share their findings in two days at Singing, an annual event where citizens join to sing Ember’s three great songs. That night, Doon is tempted to share their recent discoveries with his father but opts to save this for the big reveal at Singing, believing it will have a greater impact. As Doon drifts to sleep, in his mind’s eye he sees the wrinkled rocks resembling words in the Pipeworks’s west end and realizes this is the likely location of the “E” for “Exit.”
As Ember’s citizens gather for Song Rehearsal Day, Lina and Doon return to the Pipeworks. At the spot marking “E” for “Exit,” they review the instructions and find an iron ladder leading down to a ledge on the riverbank. There they see a rectangular space carved in the river wall and, within that space, a door and panel holding its key. In the dark spaces behind the door, they stumble upon metal boxes, one labeled “Candles” and the other “Matches.” Lina and Doon are confused at first, having never seen either object, but after several attempts they figure out how to use both and are excited to find a source of portable light. Now lighting the rooms with a lit candle, they discover a much larger object labeled “BOAT.” Unsure of its purpose, they refer to the instructions, and finally, the Builders’ exit strategy becomes clear: They are to lower the boat into the river with ropes, step inside, and then head downstream. The river, they now know, is the way out of Ember.
Lina and Doon explore the hidden spaces near the riverbank’s ledge and discover an additional room loaded with hundreds of boats. They agree to share their good news at Harken Square the following day during Singing. At home, Doon packs his pillowcase with essentials for the departure and checks on his caterpillar. As it wriggles from its cocoon, completing its transformation into a moth, Doon opens his window and sets it free. He then overhears three city guards, who say he’s wanted for spreading vicious rumors about Mayor Cole. Dean’s anger grows when he realizes the guards are in on the mayor’s crime, but he calms himself and escapes to warn Lina.
Lina and Doon hide out in Ember School, still planning to reveal their discoveries at Singing, but they grow despondent when they realize the mayor and his guards will be there. They decide, then, that their only recourse is to escape on their own that day and leave a note with trustworthy Clary so she can convey the exit plan to the city. As Lina slips off to deliver the note, though, the guards spot her and set off in pursuit.
The city guards quickly catch Lina and march her to the Gathering Hall to face Mayor Cole, who says her behavior is dangerous and disloyal. His actions, he adds, have all been for the greater good of the city. Lina rejects his propaganda, however, and calls him out for lying. Enraged, Mayor Cole tells Lina she will be locked in the Prison Room, but just as he motions for his guards, there’s a blackout.
Lina uses the cover of darkness to escape and heads for the roof, foiling the guards who believe she has left the hall at ground level. As Lina reaches the rooftop, Ember’s lights return, and Singing begins. She listens to her fellow citizens sing “The Song of the City” and “The Song of the River” and then joins in “The Song of Darkness,” just as another blackout strikes. In the distance, Lina spots a tiny flame and knows it must be Doon, lighting his way toward the Pipeworks with a candle. Lina then jumps to the Prison Room roof and then onto solid ground, where she decides to locate Mrs. Murdo and Poppy before reconnecting with Doon.
Doon leaves his hiding spot at Ember School, believing it best to head for the Pipeworks despite not knowing Lina’s whereabouts. He writes a note to his father, informing him that he found Ember’s exit in the Pipeworks, and then pins it to a kiosk in Selverton Square. As Doon lights his way down Gappery Street, Lina approaches, carrying Poppy. At the Pipeworks, they manage to lower the boat into the river, tie it to a metal rod, and pack it with supplies. Once all three children are safely aboard, Doon pulls the rope free, and they shoot downriver.
The boat plunges into total darkness as it leaves the Pipeworks. The river rages, and the boat rocks violently, but soon the current slows, and Doon is able to light candles. Eventually, the boat reaches a shallow bank at the river’s end, where the children find a pathway and a timeworn journal. Lina desponds when she discovers she still has the note about Ember’s exit strategy written for Clary, but the children are hopeful that Doon’s last-minute-note might reach his father. They fill their water bottles with river water, pack candles, and approach the path.
At the path’s entrance, Doon, Lina, and Poppy see a sign, left by the Builders to welcome refugees from Ember. The sign also informs them that the final stage of their journey, a two-hour climb, now lies ahead. After hiking by candlelight for some time, the children notice that the air starts to smell fresher and they begin to make out a faint light ahead. At last, they reach the end of the passage and emerge into an immense wilderness filled with beautiful things they have never seen and don’t have names for: “a silver lamp in the sky” (the moon), “silvery hair” (moonlit grass), “plants . . . taller than they were” (trees), “rolling swells” (hills), and “tiny flecks of light” (shining stars). For the first time, they sit transfixed and watch the sun rise, giving light to a bright blue sky, before reading the journal they had found by the river.
Lina and Doon read the journal, penned by one of Ember’s original residents during the first days of her journey into the then newly built city. From the entries, they also learn that scientists and engineers created Ember to ensure people would not disappear from the earth, which was in great peril at the time. Unaware if anyone is left and concerned that no one in Ember will know what to do, the children search for a way back, knowing the boat can’t travel against the river’s currents.
Soon the children ascend a slope and find an indent in the ground. Inside, a tunnel leads them to an immense, dizzying drop with a cluster of lights at its bottom. Lina and Doon realize it is Ember, at last grasping that the entire city, and not just the Pipeworks, exists underground. Hoping to make contact, Lina and Doon update the note they had written for Clary, adding details about their current whereabouts. Lina wraps it in Doon’s shirt, weighs the bundle down with a rock, and then drops it into the darkness. Far below, the bundle lands with a thump, directly in front of Mrs. Murdo in Harken Square.