Stardate 3141.9: The Enterprise is on patrol when it spots an old Earth spaceship left over from the 1990s. They pick up very slow heartbeats on the sensors and plot an intercept course. McCoy determines there are 60-70 living bodies aboard the ship with no signs of respiration. Spock identifies the ship as the S.S. Botany Bay and notes records of the 1990s were fragmentary due to the Eugenics Wars. Kirk takes over McCoy, Scotty, and the ship's historian, McGivers. When they arrive they discover the passengers in suspended animation, aboard a "sleeper ship." One of the chambers revives, and McGivers determines that the leader would be the one set to revive first. The revival unit starts to malfunction and Kirk breaks the chamber open. The man revives and asks how long he's been sleeping. McCoy beams back to the ship with the man.
McCoy works for 10 hours to revive the leader while a team of specialists examine the ship. They find no records aboard the Botany Bay and Spock can find no Earth records from the period to identify the ship or its purpose. McCoy determines that the leader's physique is vastly improved with increased strength, stamina, and mental capacity. Kirk then reviews McGivers' performance and is less than impressed, but accepts her acknowledgement of her mistake.
In Sickbay, the man revives on his own and takes McCoy hostage, then demands answers. McCoy refuses to back down and the leader releases him but demands to meet with Kirk. The man is evasive and gives nothing but his name: Khan. Kirk tells him they're en route to Starbase 12 and refuses to activate the other canisters. Khan begs off pleading fatigue and asks permission to read the ship's technical manuals. Kirk agrees and goes back to the bridge. There he and Spock theorize that Khan is the result of selective breeding, and that in 1993 a group of young supermen seized power in 40 nations simultaneously before turning on each other. Their numbers match the number of survivors on the sleeper ship.
McGivers goes to see Khan and he comes on to her, and asks her to come back later without answering her questions. Later, Kirk throws a formal dinner welcoming Khan to their century and McCoy notes that Khan has a natural magnetism that could overpower McGivers. Khan goes to the historian's quarters and finds it decorated with relics of the past, including a painting of him.
At the dinner, Spock probes at Khan's background until he notes that Kirk is letting his second-in-command run the interrogation. Khan almost loses control when Kirk confronts him directly, then begs off and returns to his quarters. McGivers goes to see him and apologize, and begs with him to let her stay. He forces her to humble herself and announces his plans to take the ship. He tells her to leave if she won't help him and she concedes to his demands.
In the briefing room, the command staff identifies Khan as Khan Noonien Singh, who ruled a quarter of the world from 1993 to 1996. Kirk puts Khan under guard and goes to confront him. Khan admits he finds 23rd century man inferior and says he and his people will do well in their new century. After Kirk leaves, Khan manages to open the locked door and knock out the guard, while McGivers disposes of the transporter officer. Khan beams over to his ship and revives the rest of his people, then discards the derelict.
On the bridge, Kirk gets word that Khan has escaped and finds that all ship's systems are jammed, including the turbolift. Khan has taken Engineering and cuts off oxygen to the bridge unless Kirk surrenders. The captain refuses and he and the other bridge crew collapse. Khan has them taken to the briefing room except for Kirk and offers them an alliance. They refuse and Khan reveals that he has Kirk in a decompression chamber and forces them to watch as he slowly removes the oxygen. The crew still refuses to join Khan, who needs their help to find a colony to conquer. McGivers asks to leave and Khan grants her leave. She departs… and goes to the decompression chamber, cutting off the channel. Khan figures Kirk is dead and orders Spock taken to the chamber next.
McGivers knocks out the guard watching Kirk with a hypo and frees him. She asks him not to kill Khan, and Kirk disables the man bringing in Spock. Spock gases all decks while Kirk goes after Khan. In the briefing room, Khan discovers he's lost contact with his people across the ship and gas pours in. Khan makes his escape and Scotty follows, while everyone else is knocked out. Scotty collapses but not before giving Kirk directions, and Spock notes that Khan has cut off Engineering.
Khan disarms Kirk as he comes in and crumples the phaser with his bare hands. He's activated an engine overload and Kirk has no choice but to fight him. Khan has five times normal strength, but Kirk gets his hand on a tool and takes him out, then stops the overload just in time.
Kirk calls a hearing and drops all charges, then orders Khan to be dropped on a nearby uninhabited planet in the Ceti Alpha system. Khan accepts the challenge of conquering a new world and McGivers decides to go with Khan. As Khan and his people leave, Spock and Kirk admit they'd be interested in returning some day to see what empire Khan will build for himself.