Captain James T. Kirk famously died inStar Trek movies from 1979-1991. Star Trek Generations was Shatner's final canonical appearance as Kirk, and the legendary actor hasn't reprised the role of the good Captain since 1994, although he remains indelibly linked to Captain Kirk.
Kirk's death was part of Star Trek Generations from its inception. In the early 1990s, Paramount saw four TNG movies Shatner's participation was crucial because the death of Captain Kirk was planned as the movie's big climactic moment in order to the torch to Picard.
Shatner described his participation in Star Trek Generations in his memoir, Star Trek Movie Memories, and Kirk's famous last words were revealed to be the actor's brainchild. When Kirk is killed by the villainous Dr. Tolian Soran (Malcolm McDowell), the Captain's final words as scripted by Ronald D. Moore and Brannon Braga were, "It was fun." But Shatner asked himself about "the next step" and "what would Kirk see as he drew his final breath?" beyond "It was fun" summarizing Kirk's final heroic act with Picard and his life of outer space adventure. The actor wondered about the abyss the Captain would gaze into and how Kirk would react to glimpsing the true final frontier. Shatner realized he could sum up what the character saw with two words: "Oh my!"
Shatner's decision to extend Kirk's death scene by adding "Oh my!" was embraced by Star Trek Generations' producers. In his memoir, Shatner went on to explain he felt the way Kirk faced death, with a sense of openness and curiosity, is the way he hopes to face his own mortality one day. "Oh my!" also encomes how Kirk never wavered from facing the unknown. As performed by Shatner, Kirk's "Oh my!" powerfully and evocatively added an ineffable quality to what was, otherwise, an unceremonious way to bump off arguably the greatest Captain of the Enterprise, and it made Kirk's grand finale truly memorable.
Shatner embodied Kirk for 28 years when Star Trek Generations was in production and he knew the character better than anyone. Shatner was deeply involved in Kirk's small but critical role from the onset and his ideas and approval were sought by Generations' screenwriters. At that point, Shatner accepted Kirk's time in the Enterprise's Captain's chair was over and he was determined to give the Starfleet legend a worthy sendoff. Although the actor couldn't affect the lackluster circumstances of Kirk's death, Shatner ably serviced the way his character met his demise.
All those years ago, neither Shatner nor Star Trek Generations' producers could have imagined that Star Trek is currently thriving with multiple shows on Paramount+ (and more on the way). Unfortunately, the shortsightedness of killing off the Enterprise's original Captain means Kirk isn't part of Star Trek's current renaissance. William Shatner's throughline as Captain Kirk definitively ends in Star Trek Generations but thankfully, Shatner ensured that the character met his last moments on his own and with iconic last words that conveyed Captain Kirk's heart as an explorer.