Star Trek: Where No Man Has Gone Before

The Starship USS Enterprise, commanded by Captain James Kirk, is on an exploratory mission to leave the galaxy. While en route, it discovers the "black box" recorder for the SS Valiant, a lost Earth starship, and beams the battered device aboard. The 200-year-old recorder is barely functional, but indicates that the Valiant had been swept from its path by a "magnetic space storm". It holds data about the last moments aboard the ill-fated ship, and shows that the crew had been frantically searching for information about extra-sensory perception (ESP) in the ship's library computer. The tape ends with the captain of the Valiant giving a self-destruct order.
Kirk decides that they need to know what happened to the Valiant, and Enterprise crosses the edge of the galaxy. It encounters a strange barrier, which causes serious electrical damage to the ship's systems, and the vessel is forced to back off. At the same time, Helmsman Gary Mitchell and ship's psychiatrist Dr. Elizabeth Dehner are both knocked unconscious by the field's effect. After they awaken, Mitchell's eyes glow silver, and he soon begins to display remarkable psionic powers. Dehner's powers grow at a slower rate than Mitchell's, but she eventually develops the silver glow as well, and later develops powers that are almost as powerful as Mitchell's.
Mitchell and Kirk have been close friends for many years. As a Starfleet midshipman, Mitchell was one of then-Lieutenant Kirk's students.
Over time, Mitchell becomes increasingly arrogant and hostile toward the rest of the crew, declaring he has become godlike. He enforces his desires with fearsome telepathic and telekinetic powers. Mr. Spock believes that the Valiant may have experienced the same phenomenon and that such powers were developed by its crew as well. The other crew members must have destroyed the ship to prevent the power from taking over the galaxy. Spock hints that Kirk may have to find a way to destroy Mitchell before he goes too far, which Kirk angrily refuses.
Alarmed that Mitchell may eventually take over the Enterprise, Kirk decides to have him marooned on an unmanned lithium-cracking facility on the remote planet of Delta Vega, as per Spock's recommendation. Once there, the landing party tries to confine Mitchell, but his powers are too great. He eventually goes on a rampage, kills Helmsman Lee Kelso and escapes, taking Dr. Dehner with him.
Kirk follows and appeals to Dr. Dehner's humanity for help. As Mitchell prepares to kill Kirk with his psionic powers, Dr. Dehner attacks Mitchell to weaken him. Mitchell kills Dehner, but before he can recharge and use his powers, Kirk blasts down a rock slide that buries and finishes off Mitchell for good.
Back on the bridge, Kirk places in the official log that both Dehner and Mitchell gave their lives "in performance of duty", rationalizing that they didn't ask for what happened to them.