Star Trek: Season 2, Episode 20
Ancient alien minds are given control of Captain Kirk's and First Officer Spock's bodies.