Moby Dick appeared in 1851, during an important period in American literature. The year before, Melville's good friend and neighbor Nathaniel Hawthorne published his bestseller The Scarlet Letter. The year after, Harriet Beecher Stowe published Uncle Tom's Cabin, which would become the second best-selling book in America in the 19th century after the Bible.
Two actual events inspired Melville's tale. One was the sinking of the Nantucket whaling ship Essex, which foundered in 1820 after it was rammed by a large sperm whale 2,000 miles (3,700 km) from the western coast of South America. First mate Owen Chase, one of eight survivors, recorded the events in his 1821 Narrative of the Most Extraordinary and Distressing Shipwreck of the Whale-Ship Essex. Already out-of-print, the book was rare even at the time. Knowing that Melville, his son-in-law, was looking for it, Lemuel Shaw managed to find a copy and buy it for him. When Melville received it, he fell to it almost immediately, heavily annotating it.
The other event was the alleged killing in the late 1830s of the albino sperm whale Mocha Dick, who was usually encountered in the waters off the Chilean island of Mocha
. Riddled with dozens of harpoons from his numerous escapes from whalers, Mocha Dick often attacked ships with premeditated ferocity. One of his battles with a whaler served as subject for an article by Jeremiah N. Reynolds in The Knickerbocker, New York Monthly Magazine, which Melville would likely have come across through his literary connections or during his time in New York City. Significantly, Reynolds writes a first-person narration that serves as a frame for the story of a whaling captain he meets. The captain resembles Ahab and suggests a possible symbolism for whales in that, when his crew first encounters Mocha Dick and cowers from him, the captain rallies them thus: "'Mocha Dick or the d----l [devil],' said I, 'this boat never sheers off from any thing that wears the shape of a whale.'"