The movie introduction explains that the City of Ember is a fully-contained city built to house a human community for 200 years as a shelter from an unspecified disaster. Having long since passed the 200-year mark, Ember’s food supplies are becoming depleted and blackouts are increasingly frequent and longer-lasting, as the hydroelectric generator that powers the city has deteriorated. Much of the knowledge and technology from the city’s near-mythic Builders and earlier generations has been lost.
Two twelve-year-olds, Lina Mayfleet (Saoirse Ronan) and Doon Harrow (Harry Treadaway), who live in the City of Ember are graduating from school. They begin their assigned jobs with Lina as one of the messengers who deliver communications around the city following the collapse of the telephone system. Doon is a technician in the Pipeworks of the hydroelectric generator. Lina witnesses the city’s decay as she relays messages, and Doon learns that the Pipeworks are held together with increasing amounts of patchwork. Nobody knows in detail how any of the city’s systems work. After a major malfunction of the generator during the city’s annual celebration, Lina and Doon conclude that Ember is in danger of imminent collapse. With the city’s adult population either largely ignorant of their plight or cowed by the corrupt Mayor Cole (Bill Murray), Lina and Doon search for the clues left by the Builders to show the citizens of Ember how to save themselves.
The mayor, who knows the gravity of the city’s situation, has been stockpiling food in a secret bunker to guarantee his own survival. He suspects that Lina, a descendant of an earlier mayor who died in office, and Doon may be in possession of lost secrets about Ember and orders them arrested. The pair escapes and begins their egress from the city with instructions left by the Builders. They discover a means of evacuation from the city and receive unexpected assistance from Doon’s elderly mentor from the pipe works (Martin Landau). Initially they despair at the enveloping darkness described in Ember’s folklore when they emerge from their journey, but when the sun rises they discover that light has returned to the skies and the planet has recovered. They also see the lights of Ember deep below the surface and realize they had lived in an underground city. Lina and Doon drop a message tied to a rock through a crevasse down to Ember telling the other citizens how to leave the city, where it is found by Loris Harrow, one of the few adults cognizant of the city’s plight.