The great but commercially unsuccessful novel about Captain Ahabs obsessive pursuit of a white whale?
The novel you're thinking of is Moby Dick by Herman Melville.
While considered a literary masterpiece, it was not a commercial success during Melville's lifetime. It wasn't until the 20th century that it was recognized for its literary merit and gained widespread popularity.