The Federation calls on Adm. James T. Kirk (William Shatner) and the crew of the Starship Enterprise to contain an immense nimbused object that's on a crash course with Earth. After investigating, the crew discovers that the alien cloud harbors artificial intelligence with an ominous primary directive. Crisis strikes when a probe dispatched by the energy cloud attacks the crew, abducting navigator Lt. Ilia (Persis Khambatta). An android look-alike containing her memories shows up soon after.
As Adm. James T. Kirk (William Shatner) and Capt. Spock (Leonard Nimoy) monitor trainees at Starfleet Academy, another vessel from the United Federation of Planets is about to try out the planet-creating Genesis Device in a seemingly deserted portion of space. In the process, two of Kirk's officers are captured by Khan (Ricardo Montalban), an enemy Kirk thought he'd never see again. Once more, Kirk takes the Enterprise's helm, where he meets Khan's ship in an intergalactic showdown.
Adm. James T. Kirk (William Shatner) has defeated his archenemy but at great cost. His friend Spock has apparently been killed, the USS Enterprise is being scrapped, and starship physician Dr. Leonard "Bones" McCoy (DeForest Kelley) has taken ill. McCoy's odd behavior is evidence he's harboring Spock's katra, or animating spirit, and Kirk seeks to take the Enterprise back to the Genesis Planet and find his friend. Rebuffed, Kirk takes dramatic action that results in war with deadly Klingons.