James T. Kirk/Starfleet career/Return/Inspection tour

Kirk returned to Starfleet in 2284 and took a position in the admiralty, supervising command-track cadets at Starfleet Academy among his duties. The lack of a center seat gnawed at him until he began to express discontent in his latest posting. Kirk celebrated his fifty-second birthday alone, barring a visit from his friend Dr. McCoy, who gifts him a bottle of 2283 Romulan ale and, as Kirk was allergic to Retinax V, a pair of glasses to adjust for his increasing farsightedness. 
The following day, Kirk visited the Enterprise, now commanded by Captain Spock, for an inspection tour and as an observer to a cadet training cruise. Unknown to Kirk at the time, his nemesis, han Noonien Singh had been accidentally released from his exile on Ceti Alpha V, which had lost the inhabitability it had possessed when he and his people were originally left there, by hijacking the , leading to the hunt for the Genesis Device from the Regula I space station. A call from Dr. Carol Marcus alerted the Enterprise, which changed course to investigate even though its crew was largely "a boatload of--children," in Kirk's phrasing. Despite Kirk's (somewhat half-hearted) protests, Spock insisted on deferring his command to Admiral Kirk, quipping that as a Vulcan "he had no ego to bruise."
The subsequent engagement with his old enemy was tumultuous for Kirk, including a near-disastrous blunder disregarding Starfleet regulations quoted by Saavik that nearly doomed his ship and crew. In a textbook example of Kirk's ability to wield the Enterprise against a well-matched opponent was in the encounter with the USS Reliant, where he saved the Enterprise by tricking Khan into believing he was receiving data on Genesis but instead having his shields lowered via the Reliants prefix code, allowing the ship to make several retaliatory phaser hits on the Reliant, leading to a temporary withdrawl. Following the immediate success, Kirk admitted, in frustration and fury, to having gotten "caught with my britches down," at first, namely ignoring General Order 12, which allowed the Enterprise to be crippled by the non-communicative ship's sudden attack.
After arriving at Regula I, Kirk met his estranged son, David Marcus, whom he rescued along with Carol Marcus, and the Enterprise escaped into the Mutara Nebula. A difficult battle with Khan ensued, however, Kirk prevailed after he used his long starship experience and Khan's own egomaniacal psychology to level the playing field and prevail, though it came at a great personal cost, the resulting death of his friend of twenty years, Spock. ()