Usually, when you hear the name “Professor Moriarty,” Sherlock Holmes is what comes to mind. After all, Moriarty is the nemesis of the famous detective. He’s one of the few people able to outwit Holmes.
But James Moriarty was also Data’s nemesis in Star Trek. Played by Daniel Davis, we first met Professor Moriarty in Star Trek: The Next Generation episode “Elementary, Dear Data.” Data is playing Sherlock Holmes in the holodeck and invites Geordi to come along as his sidekick Dr. Watson. Geordi quickly becomes frustrated because Data has memorized all of Sir Arthur Conan Doyle’s Sherlock Holmes stories, which means that any story the holodeck presents, Data is able to solve immediately, which takes the fun out of it.
Dr. Pulaski, who was the ship’s doctor when Beverly Crusher went to head Starfleet Medical, suggests to Geordi and Data that Data can't solve a Holmes-style mystery. She thinks because he’s an android, he can recognize an existing story but can’t use deductive reasoning to solve a new one. Data accepts her challenge, and Geordi orders the holodeck to create a Holmes-style mystery with an adversary “capable of defeating Data.” And so, the Enterprise’s Professor James Moriarty was born.
A normal holodeck character wouldn’t be able to defeat Data because they simply wouldn’t have the capacity to outthink him, but Moriarty is a true adversary for Data because he has consciousness. That means he has the capacity to outthink and outmaneuver the android. While at first Moriarty acts like a traditional holodeck villain, kidnapping Dr. Pulaski, he quickly seeks out larger challenges and takes control of the Enterprise. His primary concern shifts from beating Holmes/Data to being allowed to continue to exist. Though his actions are that of an antagonist, his motives are understandable.
Moriarty argues that, in fact, he is alive: “I think, therefore, I am” and asks to be allowed to leave the holodeck. Captain Picard doesn’t disagree that Moriarty is alive, but the type of technology he’s asking for doesn’t exist (the mobile emitter hasn’t been invented yet!). The Captain promises they’ll continue to work on it, and Moriarty cedes control of the Enterprise back to her captain and crew. Professor Moriarty returns to the memory banks of the Enterprise-D.
Four years later, Lt. Barclay stumbles across his program and reactivates Moriarty during the episode “Ship in a Bottle.” This time, Moriarty isn’t going to go quietly. He once again demands to be allowed to leave the holodeck. Shockingly, he experienced the passage of time while deactivated. But Picard still can’t give Moriarty what he wants: a way to leave the holodeck.
Moriarty won’t take no for an answer. He says “cogito ergo sum” (“I think, therefore I am”) and walks off the holodeck into the corridors of the Enterprise, to the surprise of Captain Picard and Data. He claims that his will, and his consciousness, were what allowed him to leave the holodeck.
However, it turns out that Moriarty’s dramatic exit was just an illusion. Captain Picard and Commander Data discover that this has all been part of the simulation. Moriarty never actually left the holodeck; he just tricked them into thinking he did. Meanwhile, he has once again taken control of the real Enterprise and is demanding that Commander Riker find a way to allow him and his love, Countess Regina Barthalomew, to leave the holodeck.
Captain Picard and Commander Data convince Moriarty they’ve found a way to beam him and his partner off the holodeck. Moriarty relinquishes control of the Enterprise, and he and the Countess leave in a shuttlecraft to explore the universe. At that point, Captain Picard shuts down the program. Moriarty never left the holodeck, it turns out, but they were able to give him the freedom he wanted through a computer program that will keep running and presenting them with new adventures for the rest of their “lives.”
That’s the last we saw of Moriarty before Star Trek: Picard; he may have only appeared in two episodes but his impact on Star Trek: The Next Generation was outsized.
Swapna Krishna (she/her) writes about space, technology, and pop culture at outlets such as Wired, NPR, Engadget, and more. You can find her on Twitter @skrishna.
Stay tuned to StarTrek.com for more details! And be sure to follow @StarTrek on Facebook, Twitter, and Instagram.