The 20th century was a turbulent time for Humanity. One of the greatest problems which the species faced was the creation of some dozens of "super Humans" through genetic engineering. Bred to be greatly superior both physically and mentally, some of these men and women rose to become leaders of a significant portion of the globe. They were eventually defeated in a series of devastating "Eugenics Wars" in the 1990s, and it was thought that all had perished.
In 2267 the USS Enterprise discovered the Botany Bay, an Earth spacecraft from the year 1996. Aboard were Khan Noonien Singh and some dozens of his followers, products of the Eugenics program who had escaped Earth in the ship preserved in cryogenic suspension. Khan attempted to capture the Enterprise, but was ultimately defeated by Captain Kirk. Kirk was reluctant to send Khan to a Federation penal facility, so instead he deposited the group on Ceti Alpha V, a harsh but liveable planet where they could flourish. 
Unfortunately, six months after the ship departed Ceti Alpha VI exploded, shifting the orbit of Ceti Alpha V. The resultant environmental damage laid virtually the whole planet to waste. Dozens of Khan's people perished over the next fifteen years, leaving him with a tremendous rage towards Captain Kirk.
When the USS Reliant arrived in the Ceti Alpha system looking for a lifeless planet to test the Genesis Device on, they mistook Ceti Alpha V for the destroyed Ceti Alpha VI. Khan captured the captain and first officer of the Reliant and was able to gain their obedience to him using one of the local lifeforms. He quickly took the Reliant, stranding its crew on the planet. Khan attempted to seize the Genesis technology from Regula One, but the station personnel were able to hide it on the Regula planetoid.
Admiral Kirk, on board the Enterprise for an inspection of its cadet crew, rushed to Regula to investigate garbled calls for help from the scientists there. Reliant intercepted and badly damaged the Enterprise, but Kirk was able to use the prefix codes of the ship to lower its shields and launched an attack of his own. The Reliant was forced to retreat, allowing Enterprise to limp on to Regula.
Kirk succeeded in finding the Genesis device, but was betrayed by Reliant crewmembers still under the control of the Ceti Alpha V lifeforms. Khan secured the Genesis device and abandoned Kirk on the Regula planetoid. Fortunately Kirk was able to escape back to the Enterprise, and led the Reliant into the nearby Motara nebula. Without tactical displays or shields and with limited visibility, the two ships played a lethal game of hide and seek in the nebula. Both took further damage, but eventually Kirk was able to gain a firing position directly behind Reliant and cripple the ship with phaser and torpedo fire.
Khan refused to surrender, activating the Genesis device instead. The damaged Enterprise struggled to escape without main power, but could not hope to escape the gigantic explosion. In an act of extreme heroism Captain Spock entered a section of the engine room heavily contaminated with radiation and made hasty repairs to the main energiser, enabling the ship to engage its warp drive and escape shortly before the detonation. Spock was badly injured, and died shortly afterwards. He was fired into space in a torpedo casing, which subsequently crashlanded on the Genesis planet. As Kirk said of his longtime friend, "of all the souls I have encountered in my travels, his was the most Human."