Moby-Dick takes place in the 19th century and follows the journey of the Pequod, a whaling ship captained by the monomaniacal Ahab. Ahab is obsessed with his quest for vengeance against the white whale Moby Dick, a sperm whale responsible for the loss of Ahab's leg.
The novel begins as Ishmael, the narrator, decides to sign on to a whaling ship. He travels from Manhattan to New Bedford, where he makes an unlikely friend—Queequeg, a cannibal from a South Sea island who works as a harpooner. They decide to ship out together. The odd pair travel to Nantucket, where they are able to secure positions on the Pequod, owned by Captain Peleg and Captain Bildad. A mysterious stranger named Elijah warns them about the captain of the Pequod—a man named Ahab, whom they have yet to meet.
On Christmas Day, the Pequod sets out from Nantucket loaded with supplies for a three-year voyage of whale hunting. Although Ahab remains in his cabin, Starbuck, Stubb, and Flask, the first, second, and third mates, respectively, keep things running smoothly. Eventually, Ahab emerges and Ishmael gets his first glimpse of the mysterious figure—a brooding man with one whalebone peg leg. After some time, Ahab reveals his true mission: not to hunt sperm whales, but to hunt one in particular—not for profit, but for revenge. Captain Ahab nails a gold coin to the mast of the ship and tells the men that whoever finds Moby Dick will earn it as a reward. All of the men, save Starbuck, enthusiastically agree to this quest for vengeance.
There are officially three mates on board, each of whom will be in charge of one of the smaller whaleboats when they are lowered to engage in closer hunting of a whale. And each of these mates has an assigned harpooner—Queequeg, Tashtego, and Daggoo. However, when a whale is actually sighted, Ahab's own boat crew, led by the devilish Fedallah, is revealed. Ahab has prepared his own whaleboat with accommodations for his peg leg.
The Pequod sails on, from time to time encountering sperm whales and killing them, and occasionally seeing other whaling ships. Each time another ship is met, Ahab asks for news of the White Whale. If the ship has no news, Ahab moves on without ceremony. If there is news, he listens to it before leaving. Along the way Queequeg becomes ill and, thinking he is likely to die, has a coffin made for himself. He recovers, and the coffin is converted into a life buoy. In addition, the tension between Ahab and Starbuck (who believes that Ahab's quest is blasphemous and foolish) intensifies, finally leading to a confrontation between the two.
Eventually, they meet a ship that only recently had a run-in with Moby Dick, and shortly thereafter Ahab sights the White Whale. The boats are lowered and the chase ensues. For three days the crew of the Pequod tries to kill Moby Dick, who smashes the whaleboats and proves to be very difficult to kill. On the final day of fighting, Moby Dick sinks the ship and kills Ahab. Ishmael survives by floating on Queequeg's coffin. He is rescued, and he alone lives to tell the story.