IT'S NOT THAT EASY TO GET A HALLOWEENIE EPISODE OF STAR TREK. Several years ago in the Halloween Countdown, I did a "Jack the Ripper" day during which I watched, among others, the classic STAR TREK episode "WOLF IN THE FOLD" - so I couldn't repeat that this year. However, there is one rather well-known episode of the Saturday morning cartoon STAR TREK: THE ANIMATED SERIES which fits the bill.
It's "THE MAGICKS OF MEGAS-TU" in which a devil-like, horned figure named Lucien magically appears on the bridge of the Starship Enterprise after said craft has accidentally slipped through into another dimension in which science doesn't work and magic is king. Lucien and his people know Earthlings from visits in the past and he teleports the crew of the bridge down to his planet of Megas-Tu. Oddly enough, the logical Mr. Spock seems to be the one who has the least problem with all this; he quickly adapts to commanding magical energies since it is the logical thing to do! Wary that his fellow Megans (who ain't as jovial and welcoming as Lucien) will notice the humans (if so, then why exactly did Lucien bring them down to the planet in the first place), he shushes them . . . but to no avail. The Enterprise crew quickly ends up in stocks by the aliens who wear pilgrim garb.
On their last visit to Earth during the colonial period in America, the Megans were persecuted and boined as witches and they're kinda out for a little revenge. What will happen to the staunch crew of the Enterprise this time? And since the Megans are where we get our idea for witches, is Lucien the template for our image of the Devil? All this and more await in the super-duper animated adventures of the Starship Enterprise featuring the voices of William Shatner, Leonard Nimoy, DeForest Kelley and all the rest (shades of GILLIGAN'S ISLAND!!!).