The earliest evidence on this subject was given to the world in Chapter II of “The Sign of the Four” (written in 1889, but set in 1887 or 1888). There Holmes recommends to Watson a book which he describes as “one of the most remarkable ever penned”: Winwood Reade’s “The Martyrdom of Man”. Although the book is almost forgotten today, it was very famous in its time, having been denounced by no less a figure than Mr. Gladstone, along with other “irreligious works” such as the Biblical criticism of Strauss and the philosophy of Spencer. “The Martyrdom of Man” is basically a history of the world, including its religious history, from a secular, materialist point of view: it presents Jesus as a deluded fanatic. For Holmes to praise such a work was practically equivalent to declaring himself an atheist.
However, in the short stories which appeared from 1891 onwards, Holmes makes a number of comments which sound rather Christian. Most of these involve commonplace Victorian phrases such as “for God’s sake” (in the sentence “For God’s sake, Watson, say that you are not hurt!” from “The Three Garridebs”), and saying that he will do something “if God send me health” (in “The Four Orange Pips”). While phrases such as these do not necessarily imply any very strong or orthodox belief, they seem odd things for an atheist to say.
In “The Cardboard Box” (a story published in 1892, and set in 1888 or ’89), we find this remarkable passage: “What is the meaning of it, Watson?” said Holmes solemnly as he laid down the paper. “What object is served by this circle of misery and violence and fear? It must tend to some end, or else our universe is ruled by chance, which is unthinkable. But what end? There is the great standing perennial problem to which human reason is as far from an answer as ever.” This sounds like the language of someone who is not a Christian, but would rather like to be one.
The most explicitly Christian language occurs in “The Boscombe Valley Mystery”, published in 1892, and set in 1889. At the end of the story, Holmes tells the guilty man, “Well, it is not for me to judge you”, adding, “I pray that we may never be exposed to such a temptation.” The man has only a few months to live, and Holmes tells him: “You are yourself aware that you will soon have to answer for your deed at a higher court than the Assizes.” After the man leaves, Holmes is silent for a while and then exclaims: “God help us! … I never hear of such a case as this that I do not think of Boswell’s words, and say: ‘There, but for the grace of God, goes Sherlock Holmes.’”
After this it does not seem surprising for the Christmas story, “The Blue Carbuncle” (published in 1892, and set in 1890) to contain lines such as “it is just possible that I am saving a soul… Besides, it is the season of forgiveness.”
So it would seem that the atheist Holmes of 1887 had become a Christian by 1889. Did this conversion last?
The stories set after the Great Hiatus give us little data on this question, and what they do give us is rather confusing. On the one hand there are (in “The Three Garridebs” and “Lady Frances Carfax”, both probably set in 1902) a couple of passing references to “God”, which might be no more than figures of speech; on the other, there are stories which contain passages indicative of skepticism.
In “The Sussex Vampire”, published in 1921, and set either in 1896 (according to Baring-Gould) or 1901 (according to Brad Keefauver), Holmes dismisses the idea of the supernatural, saying: “But are we to give serious attention to such things? This Agency stands flat-footed upon the ground, and there it must remain. This world is big enough for us. No ghosts need apply.”
Well, one might say, skepticism about ghosts and vampires is not quite the same as disbelief in God; but the skepticism goes further in a passage from “The Veiled Lodger” (published in 1927, and set in 1896):
“The ways of Fate are indeed hard to understand. If there is not some compensation hereafter then the world is a cruel jest.”
There is no confidence about the after-life here. Holmes seems to have returned to the state of agonized doubt that he expressed in “The Cardboard Box”.
The last word that we have on this subject comes in a story published in 1926, and set in 1898, “The Retired Colourman”. Holmes exclaims:
“But is not all life pathetic and futile?…. We reach. We grasp. And what is left in our hands at the end? A shadow. Or worse than a shadow — misery.”
My interpretation of the scanty data is that Holmes began as an atheist, then became a Christian (of sorts) in the late 1880’s, because he was troubled by the suffering in the world, and found some consolation in religion; but that later his natural skepticism reasserted itself.
These themes are explored in greater depth in my novel.