Jim realizes that the contents he has snatched from the sea chest must be valuable, so he takes the documents he has found to some local aristocratic acquaintances, Dr. Livesey and Squire John Trelawney. Excited, they recognize it as a map leading to the fabled treasure Captain Flint buried on Skeleton Island in the West Indies. Trelawney immediately starts planning an expedition. Naïve in his negotiations to outfit his ship, the Hispaniola, Trelawney is tricked into hiring one of Flint’s former mates, Long John Silver as a cook, as well as many of Flint’s old crew. Only the captain, Smollett, is trustworthy, but Trelawney has fallen under the charismatic spell of Silver and believes him to be the better man. The ship sets sail for Skeleton Island with nothing amiss, until Jim overhears Silver’s plans for mutiny. Jim tells the captain about Silver and the rest of the rebellious crew. Captain Smollett is vindicated in the eyes of the others and becomes the leader of the "faithful crew".
Landing at the island, Captain Smollett devises a plan to get most of the mutineers off the ship, allowing them leisure time on shore. Without telling his companions, Jim sneaks into the pirates’ boat and goes ashore with them. Frightened of the pirates, Jim runs off alone into the forest. From a hiding place, he witnesses Silver’s murder of a sailor who refuses to join the mutiny. Jim flees deeper into the heart of the island, where he encounters a half-crazed man named Ben Gunn. Ben had once served in Flint’s crew but was marooned alone on the island three years earlier.
Meanwhile, Smollett and his men have gone ashore and taken shelter in a stockade they found which Flint had built years earlier. Jim returns to the stockade and tells of his encounter with Ben. Silver visits under a white flag of truce and attempts a negotiation with the captain, but this merely leads to a shouting match. The pirates attack the stockade the next day, and the captain is wounded. Eager to take action, Jim follows another whim and deserts his companions, sneaking off to hunt for Ben’s handmade coracle hidden in the woods.
After finding Ben’s boat, Jim sails out to the anchored ship with the intention of cutting it adrift, thereby depriving the pirates of a means of escape. He cuts the rope, but he realizes his small boat has drifted near the pirates’ camp and fears he will be discovered. By chance, the pirates do not spot Jim, and he floats around the island until he catches sight of the ship drifting wildly. Struggling aboard, he discovers that one of the two watchmen left aboard, Israel Hands, has killed the other watchman in a drunken fit and is seriously injured himself. Jim takes control of the ship, but Israel turns against him in a fight in the rigging. Jim is wounded but kills Israel.
Jim returns to the stockade at night not realizing it has since been occupied by the pirates. Silver takes Jim hostage, telling the boy that the captain has given the pirates the treasure map, provisions, and the use of the stockade in exchange for their lives. Silver is having trouble managing his men, who accuse him of treachery. Silver proposes to Jim that they help each other survive by pretending Jim is a hostage. However, the men present Silver with a black spot and inform him that he has been deposed as their commander. In a skilled attempt to gain control of his crew, Silver slyly shows them the treasure map to appease them, narrowly saving Jim's life (and Silver's) from the fickle pirates. Silver is unanimously re-elected as captain, to cries of "Silver!" and "Barbecue forever! Barbecue for cap'n!"
The next day Silver leads Jim and the last five pirates to the treasure site, but they are shocked to find it already excavated and the treasure removed except for a few stray coins. The pirates are angered and ready to kill Silver and Jim once and for all. At that moment Dr. Livesey, Squire Trelawney, Ben Gunn, and the others appear from the bushes and fire on the pirate band, killing two and scattering three others throughout the island. Silver at this point has switched sides yet again, and because he saved Jim's life earlier, is accepted warily back into the group.
After spending three days carrying the loot from Ben's cave to the ship, the men prepare to set sail for home. There is a debate about the fate of the remaining mutineers. Despite the three pirates’ pleas, they are left marooned on the island, perhaps a kinder fate than returning them home to the gibbet, and much to the glee of Ben Gunn. Silver is allowed to join the voyage to a nearby Spanish American port, where he sneaks off the ship one night with the help of Ben Gunn carrying a small portion of the treasure and is never heard of again. The voyage home is uneventful.
Squire Trelawney and Doctor Livesey resume their business as usual, despite being thousands of pounds richer. Captain Smollett retires from the sea on his share and lives peacefully in the country. Ben Gunn spends all of his money within nineteen days and soon falls back upon begging. However, he is given a small pension by the Squire and quieted down, "... though something of a butt, with the country boys, and a notable singer in church on Sundays and saints' days."
Jim Hawkins is able to run the Admiral Benbow on his own, but suffers in a deeper way from his time on the island. "The bar silver and the arms still lie, for all that I know, where Flint buried them ... [but] oxen and wain-ropes would not bring me back again to that accursed island; and the worst dreams that ever I have are when I hear the surf booming about its coasts or start upright in bed with the sharp voice of Captain Flint [Silver's talking parrot] still ringing in my ears: 'Pieces of eight! Pieces of eight!'"