The Qeng Ho arrive at the OnOff star shortly before the Emergent fleet, a few years before the sun turns on, at which point the Spider civilization will "wake up" and continue its climb into a technological civilization. A reception held by the Emergents doubles as a vector to infect the Qeng Ho with a timed "mindrot" virus. The Emergents time an ambush to take advantage of the onset of symptoms.
During these events, a concurrent history of the Spider civilization unfolds– mainly through the picaresque, and then increasingly political and technocratic, experiences of a small group of liberal-minded and progressive Spiders. Their struggles against ignorance and obsolescent traditions are coloured with oddly human-like descriptions and nomenclature, prefiguring somemajor plot revelations towards the end of the story.
Far above, after a close fight, the Emergents subjugate the Qeng Ho; but losses to both sides force them to combine and adopt the so-called "Lurker strategy", monitoring and aiding the Spiders' technological development, waiting until they build up the massive infrastructure and technological base that the visitors need in order to repair their vessels.
The mindrot virus originally manifested itself on the Emergents' home world as a devastating plague, but they subsequently mastered it and learned to use it both as a weapon and as a tool for mental domination. Emergent culture uses mindrot primarily in the form of a variant which technicians can manipulate in order to release neurotoxins to specific parts of the brain. An active MRI-type device triggers changes through dia- and paramagnetic biological molecules. By manipulating the brain in this way, Emergent managers induce obsession with a single idea or specialty, which they call Focus, essentially turning people into brilliant appliances. Many Qeng Ho become Focused against their will, and the Emergents retain the rest of the population under mass surveillance, with only a portion of the crew not in suspended animation. The Qeng Ho trading culture gradually starts to dilute this, by demonstrating to the Emergents certain benefits of tolerated and restricted free trade; the two human cultures merge to some extent over the decades of forced co-operation.
Pham Nuwen, the founder of the Qeng Ho trading culture, is living aboard the fleet under the pseudonym Pham Trinli, posing as an inept and bumbling fleet elder. He subverts the Emergents' own oppressive security systems through a series of high-risk ruses. During his plotting he begins to admire the Emergents' Focus technology, seeing it as the missing link in his lifelong goal to create a true interstellar empire and break the cycle of collapse-and-rebuild that plagues human planetary civilizations.
The plan to wrest fleet control from the Emergents, however, requires the co-operation of a much younger Qeng Ho who, through attrition, has become the Qeng Ho "Fleet Manager". His position as the unique liaison officer between Qeng Ho and Emergents leads him to despair, and he accepts Pham Nuwen's offer to join a plot against the Emergents as a way to personal redemption as well as to take revenge against the Emergents. However, his understanding of Pham's ambitions for Focus technology leads to a confrontation between them over the future use of Focus by the Qeng Ho. With new knowledge of the effects and victims of Focus, Pham is forced to admit the cost is too high, and the two reach an agreement and continue their plotting.
The critical moment comes when the Emergents attempt to provoke a nuclear war on the Spider home-world in order to seize power. The conspirators subvert the Emergents' systems and put their plans in action, but so do a small group of Spiders who have become aware of the humans and have been working in secret for years to subvert their Focused as well. Together, the two sides successfully defeat the ruling class of the Emergents.
The combined Emergent/Qeng Ho fleet now negotiates with the Spider civilization as a trading partner. Pham announces his plans to free all of the Focused in the entire Emergent civilization, and, if he survives that, to go to the center of the galaxy to find the source of the OnOff star and the strange technology remnants that have clearly traveled with it.