Treasure Island is a coming-of-age story.
Treasure Island is also an adventure novel. While its genre is technically historical fiction because its setting is the 1700s, Robert Louis Stevenson wrote it with the intention of creating a narrative rich in action and suspense. Despite his suggestions of the ambiguity of morality with the character Long John Silver, Stevenson composed this coming-of-age story for his son.
A boy named Jim Hawkins discovers a sea chest containing maps and a journal. Since his father is dead, he takes the maps to the local physician, Dr. Livesey, who becomes very interested because it is a map for buried treasure on an island. The doctor then talks with the local squire Trelawney, who proposes buying a ship and searching for this treasure. Jim goes along as the cabin boy.
Once on the sea, Jim overhears the crew and learns they are pirates who intend to steal the treasure after the ship lands on the island. This is why Long John Silver, the "cook," has exerted more control over them than the captain of the ship. Once the ship approaches the treasure island, the crew becomes very rowdy, leading Captain Smolett to have half the crew go ashore and the other half remain on the ship. Jim smuggles himself along. He meets Ben Gunn, who was with Captain Flint when he buried the treasure. While this is happening, Dr. Livesay finds Captain Flint's stockade. When he hears the screams of a crew member being murdered by Long John Silver, Livesay decides to move the honest crew off the ship to the fort. A battle then begins.
During a hiatus, Jim sneaks away and borrows Ben Gunn's boat so he can go to the ship and cut the anchor rope, setting the ship adrift. His little boat gets smashed, so he jumps to the bowsprit of the ship and climbs aboard. He is attacked by Israel Hands. A knife hits Jim in the shoulder, but he manages to shoot the pirate. This is Jim's coming-of-age moment, and he makes other moral choices afterwards.
A certain moral ambiguity accompanies the pirates, especially Long John Silver. He kills one of the crew, but this pirate is really evil, and he later saves Jim from the pirates, saying,
You won't fight, as gentlemen o' fortune should; then, by thunder, you'll obey, and you may lay to it! I like that boy now; I never seen a better boy than that. He's more a man than any pair of rats of you in this here house, and what I say is this: let me see him as'll lay a hand on him—that's what I say, and you may lay to it.
Thus, Long John Silver becomes one of the "good-bad" villains compared to the others. In the end, Long John Silver slips away, so moral judgment never falls upon him. In this way, Stevenson avoids damaging an interesting character in literature.