The Valley of Fear is the fourth and final Sherlock Holmes novel by Sir Arthur Conan Doyle. It is loosely based on the Molly Maguires and Pinkerton agent James McParland. The story was first published in the Strand Magazine between September 1914 and May 1915.
At the outset of the novel, Sherlock Holmes receives a mysterious cipher message from a man who writes under the pseudonym Fred Porlock, an agent to Professor Moriarty. Porlock occasionally sends Holmes insider information. Moriarty is blameless in the eyes of the law, but Holmes knows him to be "the controlling brain of the underworld." Together Holmes and Watson decipher Porlock's message which relates that a man named John Douglas, residing at Birlstone, is in danger.