Ahab had lost his leg to Moby Dick.
In Chapter 41, Ismael relates the history of Ahab's encounter with Moby Dick. Moby Dick had been known to turn around on those who chased him; the great whale shattered their boats to shreds or frightened them back to their ships. Captain Ahab was one of Moby Dick's victims. As the whaling boats incurred broken prows, Ahab found himself poking desperately with only a six-inch knife at the crazed whale:
And then it was, that suddenly sweeping his sickle-shaped lower jaw beneath him, Moby Dick had reaped away Ahab's leg....
Ahab did not fall down and worship it like [others]; but deliriously transferring its idea to the abhorred White Whale, he pitted himself, all mutilated, against it.
Ahab transfers all that is mad and tormented in a person, all that contains malice, all that is personified as evil, into Moby Dick, vowing to avenge himself against this malicious force.
In Chapter 32, Captain Ahab first comes on deck; he then asks the crew to keep an eye out for a white whale of wrinkled brow and crooked jaw. He tells the whalers that whoever sees this whale first will earn the Spanish doubloon he holds up. Then, he has a ritual not unlike communion in which all the crew members drink from one flagoon, and the three harpooners open the end of their harpoons and drink from them.
The narrator Ishmael later tells of his enthusiasm to spot Moby Dick. He explains that there is something preternatural and mystical about the tale of Moby Dick, who seems omnipresent as ships in different seas have spotted him during similar times, and so many calamities have occurred with this malevolent creature of ghastly color. As men from one ship have talked with others, there has developed a legend and a superstition about this whale that Ahab hunts obsessively in order avenge himself against it.
...ever gathering volume from the rumors of the White Whale [that] incorporate[d] with themselves all manner of morbid hints, and half-formed foetal [sic] suggestions of supernatural agencies, which eventually invested Moby Dick with new terrors unborrowed from anything that visibly appears.
Other men have lost their lives to Moby Dick, a sperm whale, known to be meaner than any whale most whalers hunt. For Ahab, this evil is personified in the white whale.
he lost his leg