Star Trek: The Original Series was cancelled before William Shatner could make his directorial debut.
But plans had already been set in motion for the twenty-fifth episode of the third season of the series. Entitled “The Joy Machine,” the story was outlined by Theodore Sturgeon with the teleplay adapted by Meyer Dolinsky. It was first entitled “The Root of Evil” and was originally submitted as a potential second season episode, but when that didn’t progress, it was moved to the third season.
In the story, the residents of a Federation colony were addicted to a machine that stimulated the brain’s pleasure center, rewarding them with joy in exchange for work hours. “The Game,” which was a fifth season episode of Star Trek: The Next Generation had similar properties with a game bringing the joy that allowed the crew to be controlled.
Even though the story didn’t have any action or adventure, Robert Justman really wanted to develop it further. The follow-up rewrite to the episode had even Spock becoming addicted to the machine which, given the Vulcan’s suppression of his emotions, would have been interesting to see.
The third season of Star Trek: The Original Series was going to have at least one more episode with William Shatner in the director’s chair.
Fred Freiberger took over as producer of season three of the series, and he liked the concept of “The Joy Machine.” He assigned Meyer Dolinsky to rewrite the screenplay, and he changed it a great deal. The story then became set on a planet that was inhabited by mentally ill people and had a love story for Scotty (James Doohan). He, along with McCoy (DeForest Kelley) ended up getting addicted to the machine, and it became a danger to the entire crew of the Enterprise. You can find more details about the story along with a breakdown of the script at Forgotten Trek.
What a disappointment this had to have been for Shatner who lost not only a steady job but a chance at directing for the first time, and it sounds like this episode would have ended the season on a much better note than “Turnabout Intruder,” which has consistently been ranked as one of the worst episodes of Star Trek. Though we never got to see the episode, it was adapted into a novel written by James Gunn in 1996, the premise of which went back to Theodore Sturgeon’s original idea.