Moby-Dick is now considered a great classic of American literature and contains one of the most famous opening lines in fiction: “Call me Ishmael.” Initially, though, the book about Captain Ahab and his quest to catch a giant white whale was a flop.

Its author, Herman Melville was born in New York City in 1819. As a young man, he spent time in the merchant marines, the U.S. Navy and on a whaling ship in the South Seas. In 1846, he published his first novel, Typee, a romantic adventure based on his experiences in Polynesia. The book was a success and a sequel, Omoo, was published in 1847. Three more novels followed, with mixed critical and commercial results.

READ MORE: Was There a Real Moby Dick?

Melville’s sixth book, Moby-Dick, was first published in October 1851 in London, in three volumes titled The Whale, and then in the U.S. a month later. Melville had promised his publisher an adventure story similar to his popular earlier works, but instead, Moby-Dick was a tragic epic, influenced in part by Melville’s friend and Pittsfield, Massachusetts, neighbor, Nathaniel Hawthorne, whose novels include The Scarlet Letter.

After Moby-Dick‘s disappointing reception, Melville continued to produce novels, short stories (Bartleby) and poetry, but writing wasn’t paying the bills. In 1865, he returned to New York to work as a customs inspector—a job he held for 20 years.

Melville died in 1891, largely forgotten by the literary world. By the 1920s, scholars had rediscovered his work, particularly Moby-Dick, which would eventually become a staple of high school reading lists across the United States. Billy Budd, Melville’s final novel, was published in 1924, 33 years after his death.