Moby-Dick collects genres the way some people collect loose change: the novel has lots of them, all different types, tucked in its pockets and hidden in its rigging and floating alongside its whaling boats.
You can read Moby-Dick and think about it as Ishmael’s fictional autobiography, a memoir of his voyage on the Pequod and his near-death experience.
Or you could think of it as an adventure yarn, a story of a journey on the high seas in which a band of brave men meet sharks, squids, whales, and rival whaling ships as they travel most of the way around the world.
Of course, Ahab’s single-minded desire to get revenge on Moby-Dick puts this squarely in the genre of the quest, as does the long and complicated search he goes through in order to find the White Whale.
Our focus on Ahab’s mental state turns it into something of a psychological thriller; it’s a shame Alfred Hitchcock never directed a film version of this novel, because Ahab’s weird mix of sanity and insanity seems right up his alley.
The fact that everyone dies at the end makes it a tragedy, as does the way that Melville tries to give Ahab the feel of a Shakespearean tragic hero. (In fact, there’s a specific genre of Elizabethan drama called the "revenge tragedy" – Hamlet can be considered an example.)
Above all, this novel is literary fiction if ever there was any. Not only is Moby-Dick’s language complex, allusive, and highly wrought, but it’s also very conscious of itself as a novel. It explicitly tackles questions of comprehensibility of writing and believability of narrative.