Stardate 3087.6: The Enterprise is investigating a barren uninhabited Class M planet when suddenly for two brief moments, the entire magnetic field of the solar system "blinked," obtaining zero gravity: non-existence. Spock detects a lifeform on the planet below that appeared at the moment the phenomena occurred.
Kirk and Spock take a security team down and they find an alien ship. The man appears on a cliff above them and rants of trying to stop someone, then collapses and falls to the ground below. They bring the man back to the ship where Lt. Charlene Masters reports that the dilithium crystals were drained by the phenomena. Commodore Barstow informs them that the Federation felt the phenomena across its entire length, and the Enterprise must investigate on their own while Starfleet musters for the anticipated invasion.
Kirk goes to talk to the recovering man, who identifies himself as Lazarus and says he's chasing a hideous monster across the universe. Lazarus says the monster, which he calls anti-life, destroyed his entire civilization. Kirk is skeptical but takes him down to the planet, where Spock is unable to confirm the monster's existence. Suddenly the phenomena occurs again and Lazarus runs off. Kirk chases him but as the universe flickers, Lazarus seems to be thrown into some extra dimensional plane of existence fighting his monster. Kirk finds an injured Lazarus who insists they must find the monster before it kills them all.
Back on the ship, McCoy bandages Lazarus' head wound while Kirk and Spock try to figure out what's going. McCoy calls Kirk down to Sickbay to report that Lazarus' head wound has disappeared. Lazarus has gone to the mess hall where he overhears Masters mention finishing the work on the dilithium crystals. Lazarus goes outside but again seems to swap places with something, and the wound on his head reappears. Kirk and McCoy find him and the doctor is astonished that the wound is there.
Spock reports that he has located radiation on the planet that was not there earlier. The science officer identifies it as a rift in their universe and localized it with the dilithium crystals. Lazarus insists that they can use the dilithium to trap and destroy the monster. Kirk refuses to give them over and insists that Lazarus explain what's going on. He refuses and stalks off the bridge, and once again struggles with some figure in another dimension. Lazarus' head wound disappears and he sneaks into engineering to dispose of Masters and another man.
Kirk interrogates Lazarus, now with a head wound, and demands to know where the two missing crystals are. Lazarus denies having stolen the crystals and blames his enemy, but his explanation of what the monster can do with them is vague. Kirk suspects the dilithium crystals are on the planet and beams down with Lazarus. They can detect the radiation from the ship but not on the planet, so they spread out and search. The same phenomena sweeps across the planet again. Lazarus is up on a cliff and warns Kirk to avoid a falling boulder, then falls off the cliff.
Back on board the ship, Kirk reveals that there is no planet at the coordinates Lazarus gave, and demands answers. Lazarus explains that he is a time traveler and the planet below them is his planet, and he is from the future. The monster is another time traveler and Lazarus demands the crystals. Kirk refuses and leaves him to recover, but once alone Lazarus is altered yet again.
Spock determines that since the sensor can't identify the radiation as any known form, it must be from a parallel universe, a minus to the Federation's positive universe. They deduce that there are two Lazarus, and the portal through which they change places is on the planet below. Spock warns that if identical positive and negative, or matter and anti-matter, meet then the result is annihilation.
The wounded Lazarus (Lazarus A) has left Sickbay and sets a fire, forcing McMasters out of engineering so he can steal another two dilithium crystals. He beams down to the planet and Kirk goes after him, while Spock gets a security team. Lazarus hooks the crystals up into the portal of his ship but Kirk enters first and is teleported away.
Kirk finds himself on an altered planetscape with a slightly different ship. The unwounded Lazarus (Lazarus B) greets him rationally and explains he took the crystals to stop Lazarus A. If Lazarus A comes through at a time of his own choosing, they're all doomed. Lazarus B works to complete the work on his own ship, as it will take about ten minutes to recharge after Kirk used the transmission device prematurely. A negative magnetic corridor connects the two universes and it acts as a prison. Lazarus B's people found a way through the corridor, setting off the insanity in Lazarus A who became obsessed with destroying his counterpart… and everything else.
Lazarus B has Kirk go back with instructions to force Lazarus A into the portal and through to the corridor where his counterpart will be ready… and keep him trapped for all eternity after Lazarus' ship is destroyed. Kirk agrees and Lazarus B sends him back to the positive universe. Once there, Kirk struggles with Lazarus and shoves him into the portal. Back aboard the ship, they destroy Lazarus' ship with phaser fire, and the two Lazarus' will struggle for all eternity. Kirk orders the Enterprise out of orbit and is left to contemplate the price the universe will pay for its safety.