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. The novel starts with Sherlock Holmes receiving a cipher message from Fred Porlock , an agent of Professor Moriarty