The protagonist of Treasure Island, Jim Hawkins, has been asked by his acquaintances Doctor Livesey and Squire Trelawney to write down his recollections. He begins by discussing the “Admiral Benbow” inn that his family owned when he was a boy, not far from the English port of Bristol. One day a strange, ragged-looking, and intimidating man arrives: he asks only to be called captain, and asks Jim to keep a lookout for a man with only one leg. The captain spends much of the time drunk on rum, and after a pirate named Black Dog comes to see him, he is so nervous that he has a fainting fit. Afterwards, he tells Jim that Black Dog was after something in his sea chest: if he ever dies, he tells Jim, the boy should find what’s in it and follow the instructions inside.
Soon Jim’s father falls ill and dies. The very day after the funeral, a blind man (Pew) arrives and gives the captain the black spot, which deposes him from power among the other pirates. Shocked, the captain falls down dead. Since he hasn’t paid his rent for months, Jim and his mother decide to break into his sea chest chest and seize what they’re owed, even though they’re now afraid of being alone at the inn, given the various people who have pursued the captain. But they succeed in opening the chest: Jim’s mother counts out some of the gold, while Jim grabs a small oil-cloth packet. Hearing voices, they rush out of the house and hide by the road: it’s a group of pirates who seem to be looking for what Jim has seized. Later, Jim makes his way to the squire and doctor, who help him open the oil-cloth bag: there’s a map of an island with a place marked on it that holds treasure. The squire and Dr. Livesey are thrilled: they decide to get a ship together and travel to the island in order to find the treasure, enlisting Jim as the cabin boy.
The squire is responsible for discreetly hiring a responsible, loyal crew, though he’s been unable to keep quiet about the purpose of the ship’s journey. Still, he’s optimistic about the crew and especially about the ship cook, Long John Silver. Jim is initially suspicious when he hears that Silver has only one leg. But once he meets the man, Silver’s clean-cut appearance and kindly demeanor reassures him that Silver can’t have anything to do with the other pirates. He much prefers Silver to Captain Smollett, who is strict and rule-abiding—the squire, too, is displeased with the captain. Nonetheless, after the ship, called the Hispaniola, embarks on its voyage, little goes wrong initially—other than that the mate, Mr. Arrow, proves useless, and eventually drinks so much that he falls overboard.
Jim enjoys being included on the voyage, and especially appreciates the welcoming attitude of Long John Silver, who often invites Jim into his cabin to sit with him and his parrot, named Captain Flint (after an infamous pirate). But one evening, Jim manages to overhear Silver talking with the other crewmen about a plan to mutiny: Silver will lead other members of the crew—many of whom, it turns out, are pirates—in taking over the ship and obtaining the treasure for themselves. As soon as he can, Jim tells the squire, doctor, and captain about these plans. When the ship soon arrives at Treasure Island, the captain decides to allow a few of the pirates to go to shore in order to gain time for them to plan a defense. Jim, too, sneaks off to the island, where in the midst of exploring he meets a former pirate named Ben Gunn, who has been marooned there for three years.
The crewmen loyal to the captain manage to sneak off the Hispaniola and make it to an old log house, which they make into their fort—while the pirates have secured the ship, even though there’s not one of them who can satisfactorily steer it. Long John Silver comes to the log house to propose that the captain surrender and allow the pirates to get the treasure, but the captain staunchly refuses. Silver angrily retreats, and the first battle takes place not long after—while the captain’s group kills more pirates than vice versa, they are still at a disadvantage in terms of numbers.
The doctor goes off to meet Ben Gunn, and Jim begins to grow restless. Although he acknowledges that he is acting immaturely, Jim decides to sneak off and attempt to find the small white boat that Gunn had mentioned to him. He does find it, and once he sees the lights of the Hispaniola, now captain-less and rocking side to side, he paddles out to it. Finding aboard a pirate, Israel Hands, who is wounded and has killed his mate, O’Brien, in a drunken rage. Jim and Israel initially work together in order to navigate the ship back to shore, but the pirate soon begins to plot to kill Jim too. After a fight, Jim manages to shoot Hands dead and get the ship ashore, where he docks it, hidden in an out-of-the-way part of the island. When he arrives back to the log house, it turns out that the pirates have taken it over, and he’s taken prisoner. But after Jim declares his lack of fear, Long John Silver seems to take a greater liking to Jim, and defends him from the other pirates. It also becomes clear that the pirates are growing dissatisfied with Silver as their leader, and now debate giving him the black spot. At the same time, the pirates continue to allow the doctor to stop in periodically in order to tend to their wounds. The doctor gives Jim and Silver an enigmatic message about the treasure. He’s finally given the treasure map to the pirates, though Jim and Silver can’t imagine why.
The pirates, though, are not concerned about this, and—dragging Jim by a rope—they march across the island. After hearing a voice mentioning Darby (one of Captain Flint’s pirates) they’re almost too scared to go on, until Silver cries that it’s the voice of Ben Gunn. Finally the pirates reach the x-marks-the-spot on the map—but there’s only a hole with no treasure. Quickly recognizing his own peril, Silver immediately begins to back away with Jim at his side, and when one of the pirates, George Merry, starts to declare mutiny against Silver, Silver shoots him and another. The other pirates race away through the trees, just as the doctor and Ben Gunn emerge themselves.
As they walk back to their hiding place, they tell Jim that, in fact, Ben Gunn had found this treasure during his time on the island, and had hidden it elsewhere—which is why the doctor had given the treasure map to the pirates. After the crew loads up the Hispaniola (thanks to Jim’s ability to hide it out of sight), they sail away, leaving the remaining pirates ashore. While Jim feels more positively about Long John Silver, the others continue to be suspicious of him, and none of them is surprised when Silver slips away at the first port where they stop. The rest of the crew makes it back to Bristol unscathed, where each spends his part of the fortune according to his own character. Jim vows never to return to Treasure Island.