A century and a half after its publication, “Moby-Dick” continues to invite speculation about what, or who, could have inspired such a fervid feat of creative imagination. Like all such great works, “Moby-Dick” did not come out of a vacuum. Three recent books look closely at Herman Melville’s life and times and testify to the enduring appeal of his most famous creation.

As many readers know, “Moby-Dick” was inspired by the shipwreck of the whaling ship Essex in 1820. As David O. Dowling discusses in “Surviving the Essex: The Afterlife of America’s Most Storied Shipwreck (ForeEdge/University Press of New England, $24.95 paper), the wreck of the Essex was an early example of prurient tabloid scandal, capturing the imagination of readers eager, then as now, for stories of heroism and villainy in the face of moral dilemmas. Two of the Essex survivors later published accounts that “through skillful omission of critical facts,” in Dowling’s words, exonerated their roles in the disaster: spin, 19th-century style. Dowling’s book analyzes contextual sources — a historiographic exercise that grows dry at times — to reclaim the reputation of the captain, George Pollard Jr., whose “emotional vulnerability and noble humility were precisely the traits that Melville . . . admired.” Dowling is especially scornful of commentators who conflated Pollard with Melville’s most famous creation. These careless interlopers, Dowling sniffs, “invented an Ahab that did not exist,” for “this ‘real captain Ahab’ was no Ahab.”

advertisement | advertise on newsday

An even juicier bit of literary sleuthing is on display in Michael Shelden’s “Melville in Love” (Ecco, $25.95), which makes the intriguing claim that Melville had an affair and at least one child with a neighbor named Sarah Morewood. “The simple fact is,” Shelden writes, “that Melville’s most passionate relationship — the powerful key to unlocking his secrets — has been missing from the story of his life.” In Shelden’s telling, Melville, worn out by the demands of social conformity and financial pressure, sought solace in the arms of Morewood, a free spirit and radical thinker with a rich husband conveniently often out of town. How strong is Shelden’s case? Plausible, but not definitive. As in many such exercises, circumstantial evidence is often suggestively framed as conclusive. Shelden’s assertion, for example, that the birth of Morewood’s son was accompanied by “the knowing glances of astute observers” is highly speculative, to put it mildly. Provocative hypothesis aside, the most vivid character in the book is Morewood herself. A proto-feminist woman of letters, impresario and poet in her own right, Morewood strikes us in Shelden’s account as a person of imagination and courage straining against the socially imposed constrictions of her time.

The narrative engine of Mark Beauregard’s lively novel “The Whale: A Love Story” (Viking, $26) is the supposition that the inspiration for “Moby-Dick” was Melville’s unrequited passion for the older and more successful writer Nathaniel Hawthorne. The two were neighbors for a time in the idyllic Berkshire town of Lenox, and the emotional valence of their friendship has fascinated generations of scholars. The portrayal of Melville in “The Whale” is almost comically divergent from that in “Melville in Love.” Shelden’s Melville is magnetic, macho, a rake and a prankster, whereas the Melville depicted by Beauregard is dreamy, intense and emotionally needy, a man who “brims constantly with tears” and whose “soul lay shivered, hull up in the waters of eternity, waiting to sink.” “The Whale” is fiction, of course, although the author is careful to depart as little as possible from the historical record, but the accuracy of the premise is of less interest than Beauregard’s immense skill in rendering Melville’s inner voice — an impressive feat of authorly ventriloquism.

advertisement | advertise on newsday

Could Melville have been both the swaggering seducer of Sarah Morewood and the lovelorn would-be lover of Hawthorne? Could both of these seemingly contradictory narratives be true? It is possible. For all its Puritan sternness, the 19th century was marked by a more fluid understanding of sexuality, in some ways, than our own. Expressions of warm affection between men were considered natural, and there was a doubleness in the conception of normative masculine codes onshore and off, with many a sailor playing the pillaging hetero libertine — or virile husband — on land while taking sexual comfort from his fellows during the long months at sea. The dizzying homoerotic elements that run through “Moby-Dick” provide no answer. “O Nature, and O soul of Man,” cries Ahab from the deck of the Pequod. “How far beyond all utterance are your linked analogies!” Some truths remain beyond utterance.