Stardate 1704.2: The Enterprise arrives at Psi-2000 to recover a six-man scientific party assigned to observe the planet prior to its imminent breakup. Spock and Lt. Joe Tormolen beam down in protective suits and find the station personnel are all dead. The chief engineer, who froze to death at the controls, has shut down the station's life support systems. Another man strangled a woman to death before freezing himself. Another one froze in the shower, fully clothed. As the two men examine the station, Tormolen removes a glove to better operate a control. When he rests his hand on a panel near a bloodstain, a bit of liquid is drawn to his hand.
The two men beam back to the Enterprise and go through standard decontamination, and then proceed to Sickbay for a thorough examination. McCoy finds nothing wrong with either of them. When Kirk arrives to discuss what happened at the station, Tormolen, distraught, starts talking about the tragedy. As Kirk leaves, Tormolen rubs at his hands, which have grown increasingly sweaty.
The command crew review the record tapes but no one has an explanation for the seemingly insane behavior. Kirk reviews their safety protocols as they orbit the planet in close proximity to monitor its breakup. Scotty assures him that he'll have full power ready in case they need to warp out at a moment's notice.
As the planet begins to break up, Sulu and Lt. Riley go to the mess hall. Tormolen is already there and snaps at them when they come in. As personnel are called to station, Tormolen bemoans the death of the station personnel and talks about space is harsh and unfriendly and they're hypocrites for putting their lives at risk exploring it. He grabs a knife and threatens Sulu and Riley. When they try to wrestle the eating implement away, Tormolen stabs himself with the knife, getting his blood and sweat all over them.
Tormolen is taken to the bridge and Sulu and Riley report to the bridge. They both begin sweating profusely. Spock reviews Tormolen's psych profile with Kirk and admits that Tormolen always had a relatively high profile for self-doubt. However, it's never manifested so strongly and Spock believes something caused Tormolen's feelings to strongly manifest.
In Sickbay, McCoy and Nurse Chapel try to save Tormolen. Despite the fact that the wound isn't lethal, Tormolen's life signs drop steadily. He finally expires despite McCoy's best efforts.
On the bridge, Riley continues to wipe at his sweaty hands and misses an orbital adjustment, forcing Spock and Sulu to take over. McCoy calls Kirk to Sickbay to give him a report on Tormolen's death. Once he's gone, Sulu smirks and invites Riley to come to the gym with him for a fencing session. When Riley refuses, Sulu sneaks off the bridge.
In Sickbay, McCoy tells Kirk that Tormolen seemed to simply give up entirely on living. Kirk orders McCoy to check everything possible and determine if whatever caused the deaths on the planet spread to Tormolen.
Spock finally notices that Sulu has slipped away. As Uhura takes over the helm position, Riley at Navigation starts boasting about his prowess in a broad Irish accent. Spock orders him to Sickbay and the lieutenant saunters off. When he arrives, he finds Chapel there and cups her cheek, complimenting her on her appearance. She tries to tell him about his friend Tormolen's death but Riley casually dismisses it. As he leaves, Chapel begins sweating.
Kirk is back on the bridge when they get reports that Sulu is attacking crewmen with an epee. He orders Security to confine anyone who has had contact with either of them Spock believes that the Psi-2000 disease is somehow causing buried personality traits to rise to the surface: Sulu's swashbuckling nature, Tormolen's self-doubt, Riley's pride in his Irish ancestry. The planet starts contracting and they try to compensate only to discover the engines are powered down. As they try to deal with the new crisis, Sulu arrives on the bridge and grabs Uhura. Kirk and Spock manage to subdue him and send him to Sickbay. Kirk calls down to Engineering only to discover that Riley has snuck in, locked out the staff, and taken control of all ship's functions. The lieutenant starts singing over the intercom while Spock confirms that they'll hit the planet's atmosphere in 20 minutes.
Kirk checks with Scotty, who is preparing to cut into the door circuits and warns it'll take time. The infection continues to spread throughout the ship and Uhura is unable to seal the bulkheads due to Riley's actions. McCoy examines Sulu and tries to find an antidote, but warns Kirk that so far he's had no success. Scotty manages to reroute power to the helm allowing them to stabilize the ship in its downward spiral, and then returns to cutting through the wall to Engineering. Spock goes to assist him and warns that he may have to ignore safety factors and speed up the cutting procedure.
In Sickbay, McCoy leaves to get lab reports and Chapel starts to let her hair down. On the bridge, Yeoman Rand is forced to take the helm when another crewman gives in to the disease's effects. Kirk and Uhura start to lose control but manage to hold on, and Scotty calls to inform them that he should be able to cut through and restart the engines.
Spock goes to Sickbay and Chapel proclaims her love for him. She grabs his hand as she talks about loving his human and Vulcan halves, and wants him to reveal his feelings. Spock, shocked, backs away and apologizes, and then starts to lose control as the virus affects him. He gets out of Sickbay but starts crying and takes refuge in a briefing room.
Kirk and a security team go to Engineering as Scotty finally opens the door. Riley surrenders but Scotty discovers that he's totally shut down the warp drive. It will take 30 minutes to restart the cold engines and they only have eight minutes left. Kirk suggests they attempt a controlled matter/anti-matter implosion but Scotty warns that the odds against it are phenomenal. Only Spock can do the calculations in the time remaining.
McCoy finally comes up with a cure once he realizes that something on Psi-2000 has altered the basic makeup of water, attaching extra molecules. The altered water didn't show up on the decontamination scans. When the water enters the human body, it causes symptoms similar to an alcohol overdose, leading to inebriation and systemic depression.
Kirk goes to the briefing room and find Spock, who is sobbing uncontrollably about how he never told his mother that he loved her. As Spock talks about the shame of his emotions, an increasingly furious Kirk slaps him to snap him out of it. Spock finally snaps and hits him back, knocking him over the table. Kirk realizes that he's been infected as well and tells Spock that he has to get his self-control back and calculate the formula for the implosion. Spock manages to regain control of himself while Kirk starts talking about how the Enterprise is the only love in his life and demands everything he has. As the ship enters the upper atmosphere, Scotty arrives and Kirk manages to get control of himself. Spock and Scotty go to Engineering to implement the implosion while Kirk takes one more look around him, vows he'll never lose her, and then goes to the bridge.
As the ship spiral into the atmosphere, McCoy gives Kirk and the others the antidote. They set course away from the planet and Scotty and Spock engage the intermix formula. The Enterprise is blasted clear of Psi-2000 at incredible speeds. The engine is going at unmeasurable speed and they realize that they're traveling backward in time. Sulu slows down the engines and time reasserts itself. They confirm that they've been thrown three days back into the past. Spock notes that they may have discovered a means of controlled time travel and speculates on the possibilities, and Kirk orders them away from Psi-2000 on a new course.