The Starship Enterprise discovers a ship floating in space, seemingly abandoned. They send a landing party, and discover it is a human sleeper ship, launched centuries ago. They manage to revive some of the people in cryogenic suspension, among them the warlord Khan Noonien Singh.
It transpires that after the Eugenics War on Earth, and the defeat genetically enhanced faction which had tried to sieze control of the world, its leader, Khan, and his closest followers stole an experimental sleeper ship and set out on it. After Khan is revived, he attempts to sieze control of the Enterprise, but is foiled by Captain James T. Kirk. It is eventually decided to exile Khan and his group to an uncolonised planet, along with the ship's historian, who had fallen in love with him.
The story is continued in Star Trek II: The Wrath of Khan.