Sheppard is trying to explain to Ronon the virtues of ice skating and Sam informs Sheppard that his father suffered a heart attack. Meanwhile, on Earth a woman checks photos of Sheppard and newspaper articles on his father.
Rodney stops by to express his condolences and note he'd go back to Earth with Sheppard but he has work to do on another planet. Sheppard claims he's fine and Rodney has no choice but to leave. Sheppard then prepares to head for Earth and discovers that Ronon is planning to go with him. They arrive at the house, which is heavily attended by the rich and powerful. Sheppard's brother Dave greets him and promises to talk more later. Meanwhile, a woman watches the estate where Sheppard's father is being held in state. Sheppard goes to see the coffin while Ronon hits the buffet. They talk and Sheppard admits he was glad to be out of there, because he disagreed with his father over his plans for the future. Sheppard's ex-wife Nancy comes over and he admits marrying her was the best thing he ever did.
Inside, a woman, Ava Dixon, approaches Sheppard and reveals she knew about Wallace's plan with McKay and his sister, and asks to talk to them in private. Outside, Dave intercepts Sheppard and wonders if he's going to challenge the will. Sheppard tells him he has nothing to worry about and Dave tells him their father regretted their estrangement right up to the end.
The guys go to a diner with Ava, who explains she's been working with a research company and worked with Dr. Richard Poole on a secret nanite project. She didn't know about how Wallace was using McKay, and reveals she was working on creating a self-sustaining entity with nanite injections. They managed to build a Replicator, although it's not designed to self-replicate. However, one day Poole came back and said there was a security breech and shut the project down. She later found out that the government was investigating the company, but when Poole tried to deactivate the Replicator it knocked him out and fled. The Replicator has now been loose for three weeks and they haven't yet determined a way to track it.
Sheppard and Ronon take a tactical team to the company and arrest Poole, who claims he had the project under control. Poole asserts the Replicator will only kill in self defense, but Sheppard insists he help them. They beam up to the ship and demand the access code to his data files, but Poole only offers to cooperate as long as he gets access to the Replicator. Ava offers her help, warning the Replicator isn't programmed for normal social interactions. Sgt. Bates, a former Atlantis soldier, is now working with the IOA and offers his assistance. They call in Dr. Lee from vacation and using Ava's information, narrows in on the area where the Replicator is located. Sheppard suggests Poole cooperate but the doctor has nothing to lose since the government will put him away. Sheppard threatens to have Ava arrested to force Poole to cooperate and he agrees. He warns that the Replicator will try to evade and will only counter-attack as a last resort, and it's proof against normal weapons.
Sheppard has his men split up into teams of two and they split up to search the area. Bates and Poole spot the Replicator and call in the others, but then Poole knocks out Bates and goes in and tries to gain the Replicator's trust. He reveals how they tracked the Replicator and tries to convince it to self-deactivate. The Replicator kills him, while outside Sheppard and Ronon find the unconscious Bates. They beam him up to the ship and go in after Poole, and find his corpse.
Lee discovers the Replicator has cut off the signal and as he works to regain the signal, the Replicator breaks out past the tactical squad. The two men try to flush out the Replicator and chase him up a tower, but he dives into the water and escapes. Back at the ship, Lee tries to locate the Replicator while Sheppard wonders why Poole wanted to save the Replicator. He figures Poole had a buyer and goes to Nancy to get information on the project. She isn't thrilled at being asked to risk her job, particularly when he won't tell her why. She refuses to help and Sheppard accepts that, then goes to see Ava who is picking up Poole's possessions. She denies that anyone else had access to the lab and says no one else was in contact with Poole.
Sheppard meets with Lee, who reveals he accessed the records and they show that Ava has been dead for a year due to a car accident. They go after her only to discover that she's knocked out a guard and escaped. She's left a note apologizing for what happened. Lee has determined there are two sets of blueprints, one male and one female, and he figures that her programming is distinct and she was designed for social interaction. Lee warns it's less likely she'll kill, but not guaranteed. A message comes in for Sheppard from Nancy asking for a meeting. She turns over all the information she could find and admits she checked Sheppard's background and figures it's something dangerous. She asks him to be careful and they share a moment before she leaves.
Going over the files, Lee tracks down a shipment of neutronium that the Replicator will need to repair itself. They stake out the warehouse while Lee suggests they use heat. At the facility, the Replicator bursts in and knocks them casually aside, then prepares to strangle Sheppard. Ava arrives and attacks the Replicator, knocks her aside and grabs Ronon. However, it's distracted long enough for Sheppard to attach a tracking device to it. They use the ship's teleporter to beam him up into low-Earth orbit, where he burns up in re-entry.
Later, Sheppard and the others considers what to do with the captive Ava. Later, Sheppard meets with Ava who has been released as long as she doesn't work in any field of science. She admits she's scared to deal with the new emotions she has but says they may meet again. She then walks away as Sheppard disappears... and reappears in the real world. They've stored Ava's consciousness in a virtual reality and scrapped her physical body. Sheppard then goes to see Dave, who invites him in.