The city of Ember was created in the aftermath of an apocalypse, presumably a nuclear war. The war had rendered conditions on the face of the earth unlivable, so Ember was built far beneath the ground to allow survivors of the war to continue to thrive. Ember is the sole refuge remaining for the human race. Because it is located so far beneath the earth's surface, it is completely dark, and it is sustained by a complicated and ingenious system run by electricity. At the time of the story, over two-hundred years after the Ember's inception, the city is threatened because it appears that the electrical system is about to give out. If it fails completely, the city will be plunged back into complete darkness.
Ember was not intended to last forever. Its creators had estimated that, after a certain amount of time, conditions on the earth would improve to where it would be able to sustain life once again. These founders had written instructions as to how the people could escape from Ember when that time came, and the instructions had been placed in a box which was to have been passed down from mayor to mayor of the city. Unfortunately, after a number of years, the box had been lost, and ultimately forgotten. Now that the electricity system is threatened, the people are stuck in the doomed city with no way of escape.