In the aftermath of the battle at the Replicator homeworld, the Wraith Leader sends Darts to the main city to recover something. They get the Darts back on-board and manage to escape just as the planet implodes, bringing aboard their rematerialized cargo: ZPMs.
A week later, Rodney reports that the Wraith have split up, and he's tracking their former prisoner. They figure he's sending them a message for a meeting.
Ronon goes to see Teyla exercising and wonders if she should be taking it easy. Sheppard decides to go investigate and Teyla insists on going, and wonders if Shepaprd is mad that she didn't tell him sooner. He doesn't take her along and investigate the ship, to find it an apparently derelict. They go aboard but don't find any Wraiths, although they decide to call their own Wraith "Todd." They return back to Atlantis where Sheppard asks Teyla to help them fly the ship based on her connection to the Wraith and she agrees. As the two of them fly back to the Wraith destroyer, Ronon inadvertently activates a map. Meanwhile, Teyla admits she hopes to find her people: otherwise her child will be the last of her people.
Back on the destroyer, Rodney says that he's figured out the Wraith went to an outpost where there's technology that helped them defeat the Ancients. Teyla activates the destroyer, revealing her connection is more powerful then before. They arrive at the outpost and Sheppard has a weakened Teyla stay aboard the destroyer while they take the puddle jumper down. Rodney finds a stargate, an energy source on the planet, and a Hive ship in orbit.
On the planet, they find a Queen Wraith in suspended animation and several pods holding birthing Wraith. They take cover as another Wraith commander arrives to examine one of the awakened Wraith. They remove it, attach a headpiece, and take him to the others. They figure the Queen's genetic material is being distributed through the pods, but Rodney wonders why they're doing it on the planet. They find thousands of pods and Rodney figures that one Queen couldn't provide enough genetic material, and Queens don't work together. Rodney tries to pinpoint the energy source to sabotage or shut down the pods, while the Wraith command wakes the Queen Wraith. He says they have a suitable genetic template and she calls for the fallen Hive commander, Todd, to be brought to her for feeding, despite warnings that his technological expertise may still be necessary.
Sheppard, Ronon, and Rodney rescue Todd while Lorne chats with Teyla about her pregnancy and assures her she'll be a good mother. Todd explains that the Queen is creating a handful of warriors but then the Wraith clone them, which is how they defeated the Ancients. Todd reveals he acquired ZPMs from the Replicator planet to power the facility, but he revealed his plans to another Hive commander who betrayed him. They go to get the ZPMs but the Wraith intercept them. Sheppard's team is stunned and taken captive.
The guys wake up in a cell to find that Todd has escaped, but Sheppard figures he won't be coming back for them. The Hive Commander comes back and takes them to the Queen for feeding, while they search the area for Teyla and Lorne. A Wraith Dart approaches their destroyer and Todd asks permission to board. He explains the situation but warns they have no chance of rescuing them.
When Sheppard refuses to tell her the location of their ship, the Queen prepares to feed on Rodney, but hesitates then orders them back to their cell. Aboard the destroyer, Teyla ties into the Wraith systems and ties into the Queen's mind, causing her hesitation on the planet. Teyla confronts the Queen on the mental plane and commands her to get up. However, the queen senses Teyla hiding something, probes further, and realizes she is pregnant and her unborn child is augmenting her mental abilities.
The Queen goes to the cell, knocks out the guards, opens the door, and gives them their weapons. Teyla warns them they don't have much time as the Queen mentally assaults her child, and John has no choice but to shoot the Queen. They head for the map room but the Hive Commander activates the cloning pods and Sheppard orders a retreat since they don't have enough time for Rodney to find the shutdown codes.
The Hive ship heads for the destroyer and Todd warns that they can't withstand an attack. Teyla insists that Sheppard is alive and they'll remain for him, while the Hive ship enters weapon range and opens fire. Sheppard's team has made it to the puddle jumper and are heading for a rendezvous, and they do what they can to hold off the Hive ship. They get on board but Sheppard has Teyla pilot a course for the cloning facility. They escape in the puddle jumper and let the destroyer crash into the outpost.
Later on Atlantis, Rodney reveals that Todd either escaped in a Dart or was captured. Sheppard talks to Teyla, who reveals that physically she checks out and Sheppard was right to question her involvement. Now she has other considerations, and she starts crying and embraces Sheppard.