The one-and-a-half-page handwritten letter in German, known as the "God letter" was written in 1954 and addressed to the philosopher Eric Gutkind.
Reflecting on God, the physicist wrote: "The word God is for me is nothing more than the expression and product of human weaknesses, the Bible a collection of honorable, but still primitive legends which are nevertheless pretty childish.
"No interpretation, no matter how subtle, can (for me) change this."
Einstein wrote to Gutkind after reading his book Choose Life: The Biblical Call to Revolt.
Christie's auction house in New York revealed that the letter, including the buyer's premium, raked in $2.89m under the hammer.
Einstein, a Jew, was often asked to make public pronouncements about God and religion.
"For me the Jewish religion like all other religions is an incarnation of the most childish superstition," Einstein continued in his letter.
"And the Jewish people to whom I gladly belong, and whose thinking I have a deep affinity for, have no different quality for me than all other people.
"As far as my experience goes, they are also no better than other human groups, although they are protected from the worst cancers by a lack of power. Otherwise I cannot see anything 'chosen' about them."
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.