At some unspecified date in the near future, an unknown agent causes the Moon to shatter into seven pieces. As the remnants of the Moon begin to collide with one another, astronomer and science popularizer "Doc" Dubois Harris calculates that the number of collisions will increase exponentially. A large number of moon fragments will begin entering Earth's atmosphere, forming a "white sky" and blanketing the earth within two years with what he calls a "Hard Rain" of bolides; this will cause the atmosphere to heat to incandescence and oceans to boil away, destroying the biosphere and rendering Earth uninhabitable for thousands of years. It is decided to evacuate as many people and resources as possible to a "Cloud Ark" in orbit, including a "swarm" of "arklet" habitats that will be able to avoid the debris from the moon—both to attempt to preserve the human race and to give the remaining doomed inhabitants of Earth something to hope for, to prevent civil disorder from breaking out on Earth before its surface is destroyed. Each nation on Earth is invited to choose by lot a small number of young people to become eligible to join the Cloud Ark.
The Cloud Ark is to be based around the International Space Station (ISS), currently commanded by American astronaut Ivy Xiao. The ISS is already bolted onto an iron Arjuna asteroid called Amalthea, which provides some protection against moon debris. Robots are used to excavate Amalthea to provide more protection in a project run by mining and robotics engineer Dinah MacQuarie. Technicians and specialists, including Doc Dubois, are sent to the ISS in advance of the Hard Rain to prepare it to become the headquarters of the Cloud Ark.
The plan is that the Cloud Ark must be self-sufficient for 5,000 years and capable of repopulating Earth once it is habitable again. A Human Genetic Archive is sent to the Cloud Ark, with the intention that it will be used to rebuild the human population. Approximately 1,500 people are launched into space in the two years before the Hard Rain begins.
Suspecting that some architects of the Cloud Ark are interested only in pacifying Earth's inhabitants with false hope (rather than creating an environment that will actually survive in the long term), a billionaire named Sean Probst realizes that the Cloud Ark will need a ready supply of water in order to provide propellant for the space station and to prevent it from eventually falling into the earth's atmosphere. He embarks on a two-year expedition to extract ice from a comet nicknamed Greg's Skeleton, using a nuclear reactor to provide power to bring it back towards Earth.
The Hard Rain begins approximately two years after the destruction of the moon as predicted; human civilization as well as nearly all life on Earth is obliterated, although some try to take shelter underground (such as Dinah's father) or in the deep ocean (such as Ivy's fiancé). Markus Leuker, appointed leader of the Cloud Ark, declares all nations of Earth to be dissolved, and imposes martial law under the Cloud Ark Constitution. Despite a worldwide agreement that members of government will not be launched into space, the President of the United States, Julia Bliss Flaherty, manages to get herself sent to the Cloud Ark at the last minute. Shortly afterwards the main cache of the physical Human Genetic Archive attached to the ISS is ruined by the thrusters of an arklet passing too closely, leaving only samples that had been distributed amongst the arks.
There is disagreement on the Cloud Ark about the best way to organize its society and avoid the debris of the moon. Some "Arkies" favor converting the Cloud Ark into a decentralized swarm of small space vessels at a higher orbit out of range of debris, rather than maintaining the central authority of the ISS. Doc Dubois wants to shelter in the "Cleft", a crevasse on the now-exposed iron core of the moon. Others want to go to Mars. Julia Flaherty starts to acquire a coterie of followers and encourages the proponents of the decentralized swarm plan.
Sean Probst's expedition has succeeded, and he has brought a comet into an orbit that will soon pass by Earth. His radio has failed and he has built a replacement by hand, and is able to communicate with Dinah MacQuarie by Morse code. However, he and his party die of radiation sickness caused by fallout from their nuclear reactor long before the expedition is complete. Markus Leuker and Dinah travel to the comet with a small crew to take control of it and bring it back to the Cloud Ark, in order to provide sufficient propellant to reach the Cleft on the moon's core. Just before Dinah returns with the ice as the sole survivor of the mission, Julia Flaherty persuades the majority of the population to abandon the ISS and move to higher orbit in a decentralized swarm, and sends a preliminary expedition to Mars. In the course of their sudden, unauthorized departure the ISS sustains catastrophic damage to many sections. The surviving portions of the Human Genetic Archive are carried along with them, but due to the Arkies' ignorance, these surviving portions are discarded or ignored. Only the digital version of the Human Genetic Archive survives aboard the ISS. The ISS and remaining third of the cloud ark combine through reshaping the ice into a support structure, and is rechristened Endurance.
During the three years that it takes for Endurance to reach the Cleft, the majority of its population die of various causes (cancer caused by cosmic radiation, suicide, bolide strikes, etc.); by the time they are within range of the Cleft, only about 30 survivors remain. Julia Bliss Flaherty's Swarm splits into two factions, who fight; Flaherty's faction is defeated. Running out of food, the Swarm resorts to cannibalism, and by the end of three years only 11 survive, including Flaherty and the leader of the opposing faction, Aïda. Aïda requests to reunite the remnant of the Swarm with the Cloud Ark before it reaches the Cleft, but secretly plans a battle for control of Endurance; as a result of that battle the population is diminished even further.
By the time Endurance reaches the relative safety of the Cleft, there are only eight surviving Homo sapiens in space, all of whom are women. One, the sociologist Luisa, has reached menopause, and the remaining seven (Dinah, Ivy, Aïda, Tekla, Camila, Moira, and Julia) come to be known as the Seven Eves. The Human Genetic Archive has been destroyed, but they have sufficient resources to use the surviving genetics laboratory to rebuild the human race by parthenogenesis. They agree that each of the Seven Eves gets to choose how her offspring will be genetically modified or enhanced. Aïda predicts that, hundreds of years from now, this project shall result in seven new races.
The narrative jumps to 5,000 years later. There are now three billion humans living in a ring around the Earth, and they have indeed formed into seven races, each one descended from and named after the Seven Eves who survived the events of Part 2. These races have quite distinct characteristics, including "Moirans" who can undergo "epigenetic shifts", radically changing their bodies in response to new environments. The iron core of the moon has mostly been used to build space habitats, but the Cleft itself has been turned into "Cradle", an exclusive piece of real estate attached to a tether that occasionally "docks" with Earth.
Humanity has divided mostly along racial lines into two states, Red and Blue, which are engaged in a form of Cold War characterized by cultural isolation, espionage and border skirmishes, mediated by treaty agreements more honored in the breach than the observance.
The orbiting races, the Spacers, terraform Earth by crashing ice comets into it to replenish the oceans, and seed the planet with genetically created organisms based upon re-sequenced DNA data saved from the escape to orbit. Once a breathable atmosphere is recreated, and sufficient plant and animal species have been reseeded, some members of the orbiting races ("Sooners") resettle the planet, in violation of treaty agreements.
A "Seven", a group of seven people with one member from each race, is recruited by "Doc" Hu Noah, to investigate mysterious people who have been sighted on Earth. As the story unfolds, they discover that some humans did indeed survive the Hard Rain on the planet by living in deep mines ("Diggers"), while others survived in ocean trenches using submarines ("Pingers"). Although these survivors have also evolved socially and biologically to form two additional races, the survival of root stock humanity separate from the Seven Eves causes turmoil in Spacer high politics. Ground conflict eventually occurs because each of the orbiting camps (Red and Blue) wishes to establish a preferential or exclusive relationship with the Earthbound races: the Diggers, although descendants of Dinah's family, interpret the Blue state's presence on their territory as an act of aggression and develop an alliance with Red, prompting Blue to seek out an alliance with the Pingers on the strength of Ivy's connection with one of their founders. Matters are further complicated because the Diggers claim all of the Earth's land surface as their own, and initially hold the Spacers in disdain (despite their high technology) for having fled the planet eons ago.
In an epilogue it is revealed that a separate, secret underwater ark had been created concurrently with the cloud ark, leading to the development of the Pingers, based on analysis of the "selfies" Ivy's fiance had sent her, using diagrams and sketches in the background as clues. Ty invites the surviving Seven (along with Sonar and Deep, representatives of the Diggers and the Pingers, respectively) back to apartments at his bar in the Cleft with the intent of forming the first "Nine".