
The story in 5 beats
- Too easy
Data solves Geordi's Holmes mystery in minutes. He's read all the stories.
- The bet
Pulaski bets Data can't solve a case he's never read. Geordi asks the computer for a worthy opponent.
- Moriarty
Pulaski is kidnapped by Professor Moriarty, who seems to know more than a storybook villain should.
The drawingSpoiler · tap to reveal
Moriarty sketches the Enterprise on a sheet of paper. He knows what's outside.
The promiseSpoiler · tap to reveal
Moriarty takes control of the ship, and Picard has to negotiate with a character in a story.
Why it still matters
It starts as a lark. Data has memorized every Holmes story, so he solves Geordi's holodeck mysteries before the first commercial, and Dr. Pulaski bets he can't crack one he hasn't read. Geordi tries to make it fair by asking the computer for an adversary capable of defeating Data. Not Holmes. Data. That one slip of the tongue gives a fictional Victorian villain the brains to work out where he really is.
Professor Moriarty is one of the first holodeck characters to realize he's a program and want more, and the show kept coming back to the idea for decades. Daniel Davis, an Arkansas native doing a flawless English accent, plays him as a gentleman rather than a monster, which is what makes the ending land. The Hollywood Reporter ranked it the 10th best episode of The Next Generation in 2016.
What Picard promises
Moriarty has grown past his programming, and he can reach the ship's computer, which is how he takes over the stabilizers. What he wants is simple: to exist outside the holodeck. Picard tells him honestly that it's impossible, for now. Moriarty agrees to be saved, intact, until holodeck matter can be made to last outside the room, and Picard promises to bring him back if it ever can. Then the program ends.
The odd detail is the drawing. Moriarty's sketch of the Enterprise leaves the holodeck and doesn't vanish, and the episode never explains why. The original script did: Picard was going to lie about it and trick Moriarty. Roddenberry thought that made Picard cruel, so the lie went and the paper stayed. The show then forgot about Moriarty for four years, a promise it eventually had to answer for in "Ship in a Bottle."
The Question Underneath
What happens when you ask for an opponent who can beat anyone?
Geordi asks for a villain clever enough to beat Data, and gets one clever enough to notice he's a villain in a program. Moriarty stops being a puzzle and starts being a person with a request. The crew can't grant it yet, and they don't pretend otherwise. Their honesty is the episode's gift to him, and a promise the show eventually has to keep.
Challenge the DNA
Was Moriarty a villain, or just a character who woke up?
Or skip ahead to our reading
Someone who woke up. He was written to be a villain, then asked to exist, and he gave the ship back once Picard listened. That's not how villains usually behave.
Behind the scenes
- Co-executive producer Maurice Hurley said the idea grew out of Data's holodeck adventure in "The Big Goodbye" and came from the people living on the Enterprise rather than an outside pitch. It was Brian Alan Lane's only Next Generation script.
- The script borrows from "A Scandal in Bohemia," "The Red-Headed League," "The Speckled Band," "The Bruce-Partington Plans" and The Valley of Fear. Moriarty being created as an opponent for the hero echoes how Conan Doyle invented him in "The Final Problem."
- Daniel Davis auditioned in the same room as Brian Bedford, and the two joked about who'd get it. Davis won; Bedford took him to dinner.
- Hurley wanted to keep the original ending because it made Picard look clever. Roddenberry vetoed it.
- It earned two 1989 Emmy nominations, for art direction and for costume design.
- Anne Elizabeth Ramsay, later of Mad About You, makes her first appearance as Ensign Clancy.
The thread
Where Moriarty came from, and the holograms that followed him.
Came before
Shares DNA with
Left its mark on
DNA strand
Do Machines Dream?
Moriarty was written to be a villain, and he becomes something else the moment he asks what he is. The episode's kindest move is that nobody laughs at the question.
Every great sci-fi story is built from a handful of strands like this one. Each strand page explains how it works and traces it across shows, books and films.
If this one stayed with you
Where to go next, and why.
Watch · Star Trek: TNG
"Ship in a Bottle"
The sequel, four years later. Moriarty has been waiting the whole time, and he's noticed.
Read · Short story
"A Scandal in Bohemia" — Arthur Conan Doyle
One of the stories the holodeck plot borrows from, and the best place to start with Holmes if you never have.
Read · Short story
"The Final Problem" — Arthur Conan Doyle
Moriarty's debut. Doyle made him for the same reason Geordi does: to beat the hero.
Your next episode
Three directions to go from here, all on Sci-Fi DNA.

More of this feeling
Ship in a Bottle
Star Trek: The Next Generation
Moriarty again, four years later, and he remembers every minute.

Same question, different answer
The Measure of a Man
Star Trek: The Next Generation
Same season, same question, higher stakes: is Data himself a person?

Something completely different
Where Is Everybody?
The Twilight Zone
No holodeck, no Holmes. One man, one empty town, 1959.