Sisko is in a Maquis colony to meet with an informant that claims to have information about the former Starfleet officer Michael Eddington, now the leader of the Maquis. The captain is met by none other than Eddington, who discovered the traitor. Eddington transported away, and was pursued by Sisko aboard the Defiant. Sisko enlists the help of Captain Sanders and his ship, the USS Malinche, in delaying Eddington until the Defiant can arrive. When it seems that Sisko has got his man, Eddington triggers a cascade virus, disabling all of the Defiant's computer systems, leaving it effectively dead in space. This virus was planted by Eddington before he left Starfleet, further highlighting the depth of his betrayal.
After being towed back to the station by the Malinche, Captain Sanders informs Sisko that Starfleet has ordered Sanders to take over the hunt for Eddington. Sisko is furious about this development, as he took Eddington's betrayal personally.
The crew of DS9 learn of a Maquis raid on two Bolian freighters carrying selenium and rhodium nitrite, two seemingly innocuous materials. However, the Maquis use the chemicals to create cobalt diselenide, a chemical hazardous to Cardassians, but harmless to Humans. The Maquis attack a Cardassian colony with these biogenic weapons, forcing the Cardassian population to evacuate and opening the planet to Human colonisation.
Sisko decides to take a barely functional Defiant (due to the damage from Eddington's virus) to hunt down Eddington, and prevent further attacks on Cardassian colonies.
The Defiant enconters a Maquis raider signature inside plasma fields. When they approach it, they receive a transmission from Eddington. After a bit of banter, Eddington offers Sisko a copy of "Les Miserables" by Victor Hugo, calling it one of his favorite books. Finally, the crew realizes that the Maquis Raider signature is a fake, there isn't really a ship there.
Later, the Defiant happens upon the Malinche, which has been ambushed by the Maquis who disabled their engines. They were fooled by a trick similar to the Defiant: their sensors detected a Cardassian transport in distress, when they lowered their shields to transport the crew, they found that the sensor readings had been faked. In their moment of vulnerability, the Maquis attacked.
Back on DS9, Odo reveals that Eddington probably uses a Breen settlement as a base to keep his unstable weapon components. Based on that intelligence and Sisko's knowledge of Eddington, Sisko deduces the next target: Quatal Prime.
However, they arrive too late, only to see two fleeing raiders and transport ships evacuating the planet. The Defiant manages to destroy one of the raiders, but the other, Eddington on board, disables a Cardassian transport. Sisko is forced to let Eddington escape in order to save the Cardassian transport.
When Eddington sent Sisko "Les Miserables", he compared Sisko to a character in the novel, Javert, "a policeman who relentlessly pursues a man named Valjean, guilty of a trivial offense". Sisko realizes that Eddington sees himself as Valjean, the hero of "Les Miserables", and that Eddington's self-perceived heroism could be used against him. In Sisko's words: "I think it's time for me to become the villain".
Sisko then proceeds with the same strategy the Maquis had been using, he prepares to launch biogenic weapons at a Maquis settlement. Sisko broadcast a message telling his intention. After Sisko launches the weapons, Eddington realizes the captain isn't bluffing. Sisko announces that he plans to continue his campaign against all of the Maquis colonies in the DMZ. Eddington offers to turn himself in to prevent further attacks, thus fulfilling the self-sacrificial part of his hero fantasy.
In the aftermath, Cardassian and Human colonists are resettled on the poisoned colonies, exchanging their former homes.