Professor Moriarty gained control of some of the Enterprise's systems and demanded that he be allowed to leave the holodeck. However, this technology did not exist, and the crew stored Moriarty's program in the ship's computer to work on the problem. Even five years later, in TNG season 6, episode 12, "Ship in a Bottle," the Enterprise crew still did not have a way to free Moriarty from the holodeck, so they separated his program from the computer and sent him on a virtual intergalactic adventure with his companion, Countess Regina Bartholomew (Stephanie Beacham).
I’m Still Disappointed At How Star Trek: Picard Handled Professor Moriarty’s Comeback
The Moriarty In Picard Season 3 Was Not The Same One Created On TNG's Holodeck
Admiral Jean-Luc Picard (Patrick Stewart) got his old crew back together in Star Trek: Picard season 3, as they reunited aboard the USS Enterprise-D to save the galaxy yet again. Despite his deaths in Star Trek: Nemesis and Picard season 1, Data returned in Picard season 3 with a newly upgraded android body, complete with organic emotions. Before Data completed this upgrade, however, Captain William Riker (Jonathan Frakes), Captain Worf (Michael Dorn), and Commander Raffi Musiker (Michelle Hurd) found the android acting as security for Daystrom Station.
As the landing party explored Daystrom Station, they encountered a facsimile of Professor Moriarty as part of the station's security. While it was fun to see Moriarty again, this version of the Sherlock Holmes villain was simply a part of Data's programming. Moriarty's appearance was accompanied by the song "Pop Goes the Weasel," which Data was attempting to whistle during his very first meeting with Riker. Riker even pointed out that this Moriarty was not the same one they encountered on the Enterprise, meaning we may never get an explanation about what happened to that self-aware Moriarty.
We’ll Probably Never Know What Happened To Moriarty After TNG (Unless Star Trek: Legacy Happens)
I Like To Think Moriarty & The Countess Are Still Out There Exploring The (Virtual) Stars
At the end of Star Trek: The Next Generation's "Ship in a Bottle," Moriarty genuinely believed he had escaped the holodeck, but in reality, he was still in a virtual world stored within a holo-cube. The memory module containing Moriarty's program was not seen again on screen, and it remains unknown what became of the device after the destruction of the USS Enterprise-D in Star Trek Generations. Presumably, the module was stored somewhere safe, as Lt. Reginald Barclay programmed the device with "enough active memory to provide them experiences for a lifetime."
Professor Moriarty and the Countess could still be exploring their virtual galaxy, unaware of their true nature. It's also possible that they discovered the ruse, which would likely make Moriarty even angrier with Picard and his Enterprise crew. The ultimate fate of Moriarty will likely remain unknown unless the proposed spin-off of Star Trek: Picard, Star Trek: Legacy, ever happens. Unfortunately, this seems unlikely at this point, but anything is possible. Whether or not Moriarty's story ever gets a proper conclusion, Star Trek: Picard at least gave Daniel Davis a chance to play the iconic villain one more time.