Sir Arthur Conan Doyle wrote this story shortly after returning to his home Undershaw from South Africa, where he had worked as a volunteer physician at the Langman Field Hospital in Bloemfontein at the time of the Second Boer War.
Conan Doyle had not written about Sherlock Holmes in eight years, having killed off the character in the 1893 story "The Final Problem". Although The Hound of the Baskervilles is set before the latter events, two years later Conan Doyle would bring Holmes back for good, explaining in "The Adventure of the Empty House" that Holmes had faked his own death.
He was assisted with the plot by a 30-year-old Daily Express journalist named Bertram Fletcher Robinson (1870–1907). His ideas came from the legend of Richard Cabell, which was the fundamental inspiration for the Baskerville tale of a hellish hound and a cursed country squire. Cabell's tomb can be seen in the Devon town of Buckfastleigh.
Squire Richard Cabell lived for hunting and was what in those days was described as a 'monstrously evil man'. He gained this reputation for, amongst other things, immorality and having sold his soul to the Devil. There was also a rumour that he had murdered his wife. On 5 July 1677, he died and was laid to rest in 'the sepulchre,' but that was only the beginning of the story. The night of his interment saw a phantom pack of hounds come baying across the moor to howl at his tomb. From that night onwards, he could be found leading the phantom pack across the moor, usually on the anniversary of his death. If the pack were not out hunting, they could be found ranging around his grave howling and shrieking. In an attempt to lay the soul to rest, the villagers built a large building around the tomb, and to be doubly sure a huge slab was placed .
Moreover, Devon's folklore includes tales of a fearsome supernatural dog known as the Yeth hound that Conan Doyle may have heard.
It has been claimed that Baskerville Hall is based on a property in North Wales, built in 1839 by one Thomas Mynors Baskerville. The house was formerly named Clyro Court and was renamed Baskerville Hall towards the end of the last century. Arthur Conan Doyle was apparently a family friend who often stayed there and may have been aware of a local legend of the hound of the Baskervilles.
In 1902, Doyle's original manuscript of the book was broken up into individual leaves as part of a promotional campaign by Doyle's American publisher - they were used as part of window displays by individual booksellers. Out of an estimated 185 leaves, only 36 are known to still exist, including all the leaves from Chapter 11, held by the New York Public Library. Other leaves are owned by university libraries and private collectors. A newly rediscovered example was sold at auction in 2012 for US$158,500.