Stardate 1672.1: Kirk is meeting with a landing party on the planet Alpha 177 as the temperature starts to drop to 120 below, when Geological Technician Fisher takes a fall into some yellow ore. He beams up to get his injured hand tended to and the transporter suffers a burnout. It checks out okay and Scotty beams up Kirk, who is momentarily overcome by weakness. Scotty escorts him out but after they leave, the transporter activates and a second, savage Kirk materializes. Technician Wilson returns and the animal Kirk stalks out.
The first Kirk returns to his quarters and briefly meets with Yeoman Rand, then collapses on the bed. The animal Kirk stalks into Sickbay where McCoy is tending to Fisher's hand, and demands brandy while practically attacking McCoy. He then saunters through the corridor until he comes to Yeoman Rand's quarters.
Spock comes to see the first Kirk and verify he's okay, but they then are called to the transporter room where Scotty indicates they beamed up one doglike animal… and a second violent one materialized. They don't dare beam up the landing party, and Kirk realizes he's been duplicated.
Yeoman Rand returns to her quarters to find the animal Kirk waiting for her. He comes on to her and turns violent, and she scratches his face fighting him off. She gets to the door where Technician Fisher is walking by. Fisher goes to call for help and the animal Kirk knocks him out.
The first Kirk claims he was in his cabin the entire time and he and Spock go to Sickbay, while the animal Kirk takes refuge in his quarters. Rand claims she scratched her face but the first Kirk has no scratches. She's convinced but Fisher confirms he saw Kirk. Spock logically concludes there's an imposter aboard. Scotty confirms that the ore messed up the transporter, but the surface temperature is dropping rapidly. When Spock presses him, Kirk hesitatingly orders search parties and goes back and forth on what orders to give them. It becomes clear the first Kirk is having greater trouble making decisions.
The first Kirk broadcasts to the ship's crew that there's an imposter with scratches on his face. The animal Kirk uses makeup to cover his scratches, then stalks off into the hallways. He meets Technician Walker, asks for his phaser, then beats him unconscious. Sulu and the others start to freeze, and heating units beamed down duplicate and malfunction. The first Kirk and Spock get word of the attack on Walker and figure the animal Kirk would hide in Engineering. Kirk insists on confronting his duplicate with only Spock for company. They search Engineering and Kirk confronts his animal self, until Spock can stun him. The animal Kirk fires his phaser, hitting some transporter circuits.
They take the animal Kirk to Sickbay and bind him, while Spock notes that Kirk has been divided into "positive" and "negative" selves, but neither one can function as captain. Scotty calls to inform them of the damage to the transporter circuits. Kirk tries to reassure Sulu without much luck as his indecisiveness grows, and Scotty warns that it will take a week to fix the transporter.
The animal Kirk's body weakens and he starts to die, and the positive Kirk gives him a pep talk, reinforcing his will to live. The positive Kirk is reluctant to take his other half back but realizes he has no choice. Spock and Scotty get the transporter working and send the two animals through. However, when they reintegrate it, it dies.
Spock and McCoy disagree on the animal's death: Spock believes it's shock, while McCoy suspects a transporter malfunction. The indecisive Kirk is caught in-between them and finally agrees to undergo the merge. He goes in to see his duplicate self as Sulu calls up to notify him they're almost dead. The positive Kirk frees the animal Kirk to take him to the transporter room, but the animal Kirk attacks him and knocks him out. The animal Kirk then goes to the bridge, meeting Rand and apologizing along the way and setting up a meeting later.
Once on the bridge, the animal Kirk orders the ship out of orbit, much to Spock's surprise. McCoy and the positive Kirk (complete with scratches his duplicate gave him) arrive on the bridge, and Spock lets the positive Kirk handle it. The animal Kirk goes berserk and the weakening positive Kirk convinces him they'll both die and takes away the phaser. They get into the transporter and Spock reintegrates the two selves successfully. They beam up the landing party just in time. On the bridge, Kirk thanks Spock for both of him. Rand mentions her encounter with the impostor and Kirk thanks her. Spock then notes to Rand that the impostor had some interesting quality, as Rand looks embarrassed.