Sherlock Holmes was a fictional character in a series of books and stories written in the late 19th century and early 20th century by Sir Arthur Conan Doyle. Holmes was an English detective who used his genius, along with comprehensive observation of his surroundings, deductive reasoning and logic, to solve crimes, serving as a "consulting detective" – an expert who is brought into cases that have proven too difficult for other investigators. He was accompanied on his missions by his close friend, the physician Dr. John H. Watson, who served as the narrator of the Holmes' stories. Holmes' nemesis was Professor James Moriarty.
Data was fond of Holmes and his ability to solve mysteries by careful examination of the available evidence. Data found the great detective's methodology of deductive reasoning to be quite useful in performing his duties. (TNG: "Data's Day")
One night in 2143, Commander Jonathan Archer referenced Sherlock Holmes after Ruby correctly guessed that the reason Archer was evidently disheartened was that he hadn't received an assignment Commodore Maxwell Forrest had given out that day. In response, Archer sarcastically commented to Ruby, "Sherlock Holmes has nothing on you." (ENT: "First Flight")
Captain Spock once stated, "An ancestor of mine maintained that if you eliminate the impossible, whatever remains – however improbable – must be the truth." (Star Trek VI: The Undiscovered Country) This is, in fact, a famous quote of Holmes'. (TNG: "Data's Day") The alternate reality version of Spock also quoted this aphorism, although he did not attribute it to an ancestor. (Star Trek)
Data first became aware of Holmes when Riker called Picard a private eye, (TNG: "Lonely Among Us") though he was introduced to the works of Arthur Conan Doyle by Captain Picard. (TNG: "Data's Day") When describing Dixon Hill to Data, Geordi La Forge described Hill as a 20th century Sherlock Holmes. (TNG: "The Big Goodbye")
Later, Data played the role of Holmes in a holodeck program, alongside La Forge in the role of Dr. Watson. La Forge, while accompanying Data and Katherine Pulaski on a challenge to solve a Holmes mystery he had not read, accidentally programmed the Moriarty hologram so well that it became self-aware and learned of its true existence, requesting the computer to create an adversary capable of defeating Data, rather than capable of defeating Holmes. (TNG: "Elementary, Dear Data", "Ship in a Bottle")
Star Trek movie producer/scribe Nicholas Meyer wrote both the original novel and the screenplay for the Sherlock Holmes pastiche The Seven-Per-Cent Solution, whose cast included Georgia Brown, Joel Grey, Samantha Eggar, and Jeremy Kemp. Meyer once commented, "Star Trek fans are just as likely to be Sherlock Holmes fans." (audio commentary, Star Trek VI: The Undiscovered Country (Special Edition) DVD)
In a comic story released by WildStorm Comics titled "Embrace the Wolf", Data assumed the Sherlock Holmes persona to save crew members who were trapped in the holodeck and being hunted by the energy being known as Redjac. The being had recreated Victorian London to repeat his most famous historical role, that of Jack the Ripper. Using this identity, Data managed to rescue Deanna Troi from a house on the banks of the Thames by examining a comb left at another crime scene and identifying the mud traces left on it, and subsequently led the senior staff to a confrontation with Redjac in a slaughterhouse.