Reports of atheism probably come from his habit of speaking sharply about some aspects of Christianity, including its bloody history. In his final autobiography, published in 2010, one hundred years after his death, he had written,
"There is one notable thing about our Christianity: bad, bloody, merciless, money-grabbing, and predatory. The invention of hell measured by our Christianity of today, bad as it is, hypocritical as it is, empty and hollow as it is, neither the deity nor his son is a Christian, nor qualified for that moderately high place. Ours is a terrible religion. The fleets of the world could swim in spacious comfort in the innocent blood it has spilled."In addition, he once wrote, "Faith is believing what you know ain't so," and "If Christ were here now there is one thing he would not be – a Christian."
However, despite his critical view of Christianity, he was a theist. Specifically, he was a deist. In the essay Three Statements of the Eighties in the 1880s, Twain stated that he believed in an almighty God, but not in any messages, revelations, holy scriptures such as the Bible, Providence, or retribution in the afterlife.
He believed in a God, though not the God of Christianity, and not a God which intervened in the lives of men. However, he also wrote that "the goodness, the justice, and the mercy of God are manifested in His works."
As a side note, Twain was also a Freemason. He belonged to Polar Star Lodge No. 79 A.F.&A.M., based in St. Louis. He was initiated an Entered Apprentice on May 22, 1861, passed to the degree of Fellow Craft on June 12, and raised to the degree of Master Mason on July 10. One of the conditions to be a Freemason is that you must believe in a Supreme Being. There are no requirements as to the nature of that Supreme Being, but the initiate must believe in some conception of God.
In the 1880's, Twain described his views on several religious topics, saying,
"I believe in God the Almighty.He went on to describe his views on other topics, such as the afterlife, of which he said he was indifferent, and others.
I do not believe He has ever sent a message to man by anybody, or delivered one to him by word of mouth, or made Himself visible to mortal eyes at any time in any place.
I believe that the Old and New Testaments were imagined and written by man, and that no line in them was authorized by God, much less inspired by Him.
I think the goodness, the justice, and the mercy of God are manifested in His works: I perceive that they are manifested toward me in this life; the logical conclusion is that they will be manifested toward me in the life to come, if there should be one.
I do not believe in special providences. I believe that the universe is governed by strict and immutable laws. If one man's family is swept away by a pestilence and another man's spared it is only the law working: God is not interfering in that small matter, either against the one man or in favor of the other.
I cannot see how eternal punishment hereafter could accomplish any good end, therefore I am not able to believe in it. To chasten a man in order to perfect him might be reasonable enough; to annihilate him when he shall have proved himself incapable of reaching perfection might be reasonable enough; but to roast him forever for the mere satisfaction of seeing him roast would not be reasonable... even the atrocious God imagined by the Jews would tire of the spectacle eventually."
Later, in 1906, only four years before his death, he wrote,
"Let us now consider the real God, the genuine God, the great God, the sublime and supreme God, the authentic Creator of the real universe, whose remotenesses are visited by comets only comets unto which incredible distant Neptune is merely an out post, a Sandy Hook to homeward-bound specters of the deeps of space that have not glimpsed it before for generations a universe not made with hands and suited to an astronomical nursery, but spread abroad through the illimitable reaches of space by the flat of the real God just mentioned, by comparison with whom the gods whose myriads infest the feeble imaginations of men are as a swarm of gnats scattered and lost in the infinitudes of the empty sky."Mark Twain did believe in a God, but it was a God that was cold and distant, and very different from the "feeble imaginations of men." Mark Twain's God was closer to Cthulhu than Christ.
Those who knew Twain well late in life recount that he dwelt on the subject of the afterlife, his daughter Clara saying: "Sometimes he believed death ended everything, but most of the time he felt sure of a life beyond."