Following the events of Wings of Liberty, Terran Dominion forces attack Sarah Kerrigan and her allies in a research facility in the territory of the Umojan Protectorate. Kerrigan and other residents escape to the flagship of Raynor's Raiders, the Hyperion, but Commander Jim Raynor is cut off by the Dominion. The Hyperion escapes, but Kerrigan remains behind to locate Raynor, only to hear a Dominion newscast announcing that he has been captured and executed. Enraged, Kerrigan returns to Zerg territory to retake control of the swarm and overthrow the tyrannical Dominion.
On the volcanic planet Char, Kerrigan subdues a renegade brood before attacking the occupying Dominion forces. Kerrigan, in a rage, destroys a Dominion command fortress and kills its commander, General Horace Warfield. After a change of heart, she allows the wounded and the unarmed to evacuate. On the frozen planet Kaldir, she annihilates the local Protoss forces, reclaiming the local brood and evolving the swarm to survive in harsh climate.
Zeratul visits Kerrigan and advises her to regain her powers by traveling to Zerus, the original homeworld of the Zerg. On Zerus, Kerrigan learns that a fallen Xel'Naga named Amon was responsible for making the Zerg what they are: A warring swarm, bound to a single overriding will. Some primal Zerg, however, eluded and remained independent constantly evolving creatures. One such zerg named Zurvan, known as the "Ancient One", lies dormant in hibernation and must be awoken by Kerrigan for its knowledge on the origins of the Zerg. Upon awakening, Zurvan advises Kerrigan to seek out a primordial spawning pool to regain her former powers. Kerrigan enters the ancient spawning pool and transforms into a primal Queen of Blades. She kills and absorbs the genetic essences of four powerful hostile primal leaders and Zurvan after it attempts to collect her essence for itself. A primal leader called Dehaka and his pack join her, provided that she gives them essence to collect.
Kerrigan is contacted by a Zerg-infested Alexei Stukov, a former Vice Admiral of the United Earth Directorate who was apparently killed by Duran at Braxis. With Stukov's aid, Kerrigan assaults a research station where Emil Narud, a servant of Amon, is breeding Protoss-Zerg hybrids. After eliminating Dominion facility security forces and Tal'Darim loyal to Narud, Kerrigan confronts Narud in a showdown of power. Morphing first into Raynor and then into Kerrigan's human form, Narud impales Kerrigan before being fatally wounded. Revealing that Amon is revived, he perishes.
Meanwhile, Emperor Arcturus Mengsk contacts Kerrigan and claims Raynor is kept alive and imprisoned, as a bargaining chip against Kerrigan attacking the Dominion throne world of Korhal IV. Kerrigan relays the news to the Hyperion. They plan to hack the Dominion network to locate Raynor, but the only one with such expertise is Colonel Orlan, held captive by Mira Han, a mercenary who refuses to release him. Thus, the Hyperion attacks Mira's mining operations, forcing her to comply. Orlan locates Raynor on a prison ship that constantly changes location. Kerrigan assaults the ship and rescues Raynor, who is revolted by Kerrigan's reversion of form. Although he cannot bring himself to shoot Kerrigan, he tells her that they are done despite her confession that she loves him.
Having united all Zerg under the swarm, Kerrigan launches an invasion of Korhal, concentrating on the capital city of Augustgrad. With the aid of Dehaka and his pack, she destroys Mengsk's Psi Destroyer, a device that hurts the swarm from afar but is ineffective on the primal Zerg. As Kerrigan sends the swarm to assault Mengsk's palace, Crown Prince Valerian urges her to slow down her invasion to minimize civilian losses; she accepts, understanding that Valerian is not like his father. Midway through the final battle, Raynor arrives to assist Kerrigan, much to her surprise. Together, they succeed in breaching the imperial palace. In the confrontation that follows, Mengsk reveals that he has the Xel'Naga artifact in his possession, intending to use it to kill Kerrigan. Before Mengsk can do so Raynor interferes, allowing Kerrigan to impale Mengsk. Kerrigan kills Mengsk by injecting psionic energy causing him to explode.
As the dust settles, Kerrigan thanks Raynor before joining her swarm. With her quest for vengeance completed she renounces everything she once was or had and prepares to face Amon, the enemy of all living things, in a conflict that will not only decide the fate of the Koprulu Sector, but the entire Galaxy.