Only one Star Trek: The Original Series character was present for two of the apparent deaths of Captain James T. Kirk (William Shatner). Kirk definitively died at the end of Star Trek Generations, but there were two other notable moments when he was believed to have met his end. Firstly, in the TOS episode "The Tholian Web", Kirk was stranded aboard the USS Defiant when it ed into another universe. With only a few hours left in his oxygen tank, Kirk was assumed to be dead when the USS Enterprise failed to beam him to safety. Decades later, Kirk was aboard the USS Enterprise-B when he once again phased into another dimension.
Star Trek: The Original Series' Ensign Pavel Chekov (Walter Koenig) was present aboard both Enterprises during the Tholian and Nexus incidents. However, due to the mental instability caused by the dimensional interphase, Chekov was consigned to sickbay and was not cognizant of Kirk's apparent death. However, one member of the Enterprise crew who didn't succumb to the effects of the dimensional interphase was Chief Engineer Montgomery Scott (James Doohan) who also accompanied Kirk and Chekov on the first flight of the USS Enterprise-B.
Scotty Saw Kirk's Tholian Web And Nexus "Deaths"
As the Chief of Engineering aboard the USS Enterprise, it was down to Scotty to try and rescue Kirk from the USS Defiant. As the stricken starship phased into another dimension, Scotty locked on to Kirk's signal but was unable to beam him aboard in time. Scotty attended the memorial service that was held for Captain Kirk while the Enterprise was caught inside the Tholians' web. When it was discovered that Kirk is still alive, Scotty and Commander Spock (Leonard Nimoy) successfully predicted the exact moment of Kirk's next appearance, enabling the Enterprise captain's rescue.
Decades later, when the USS Enterprise-B became caught in the path of the Nexus' destructive energy ribbon, Scotty witnessed the aftermath of another of Kirk's "deaths". Kirk volunteered to modify the Enterprise-B's deflector to free the ship from the wake of the Nexus. Although he savied the ship, Kirk was blown out of the gash in the Enterprise's hull into the vacuum of space. Realizing the ramifications of the damage to the ship, Scotty, Chekov and Captain John Harriman (Alan Ruck) realized to their horror, that the legendary Enterprise captain was now lost forever.
How TOS Set Up Kirk's Nexus Fate In Star Trek Generations
Kirk wasn't dead when he was blown out of the Enterprise-B's hull, however. Instead, he found himself inside Star Trek Generations' Nexus - a heavenly dimension in which one's greatest desires could come true. The Nexus was effectively Kirk's personal heaven, and he lived out his days in Idaho with his beloved dog Butler and lost love Antonia. His companions within the Nexus were illusions, however, and ultimately Kirk was in a universe all of his own, something he experienced in "The Tholian Web".
Reflecting on his experience after returning to the captain's chair aboard the Enterprise, Kirk observed that: "I had a whole universe to myself... I must say I prefer a crowded universe much better". This line from Star Trek: The Original Series neatly sets up Kirk's experiences in the Nexus. Kirk's realization that his Uncle's horses, Antonia, and his dog Butler aren't real drives him to Captain Picard (Patrick Stewart) to save the Veridian system. In leaving the Nexus, Kirk gave his life to defeat Dr. Soran (Malcolm McDowell), and ensured that the universe remained crowded for generations to come.