An old sailor, calling himself "the captain" but really called Billy Bones, comes to lodge at the Admiral Benbow Inn on the English coast during the mid 1700s, paying the innkeeper's son, Jim Hawkins, a few pennies to keep a lookout for "seafaring men." One of these shows up, frightening Billy (who drinks far too much rum) into a stroke, and Billy tells Jim that his former shipmates covet the contents of his sea chest. After a visit from another man, Billy has another stroke and dies; Jim and his mother (his father has died only a few days before) unlock the sea chest, finding some money, a journal, and a map. The local physician, Dr. Livesey, deduces that the map is of an island where the pirate Flint buried a vast treasure. The district squire, Trelawney, proposes buying a ship and going after the treasure, taking Livesey as ship's doctor and Jim as cabin boy.
Several weeks later, Trelawney sends for Jim and Livesey and introduces them to Long John Silver, a Bristol tavern-keeper whom he has hired as ship's cook. They also meet Captain Smollett, who tells them that he does not like the crew or the voyage, which it seems everyone in Bristol knows is a search for treasure. After taking a few precautions, however, they set sail for the distant island. During the voyage the first mate, a drunkard, disappears overboard. And just before the island is sighted, Jim overhears Silver talking with two other crewmen and realizes that he and most of the others are pirates and have planned a mutiny. Jim tells the captain, Trelawney, and Livesey, and they calculate that they will be seven to nineteen against the mutineers and must pretend not to suspect anything until the treasure is found, when they can surprise their adversaries.
But after the ship is anchored, Silver and some of the others go ashore, and two men who refuse to join the mutiny are killed — one with so loud a scream that everyone realizes there can be no more pretense. Jim has impulsively joined the shore party, and now in running away from them he encounters a half-crazy Englishman, Ben Gunn, who tells him he was marooned here and can help against the mutineers in return for passage home and part of the treasure.
Meanwhile Smollett, Trelawney, and Livesey, along with Trelawney's three servants and one of the other hands, Abraham Gray, abandon the ship and come ashore to occupy a stockade. The men still on the ship, led by the coxswain Israel Hands, run up the pirate flag. One of Trelawney's servants and one of the pirates are killed in the fight to reach the stockade, and the ship's gun keeps up a barrage upon them, to no effect, until dark, when Jim finds the stockade and joins them. The next morning Silver appears under a flag of truce, offering terms that Captain Smollett refuses, and revealing that another pirate has been killed in the night (by Ben Gunn, Jim realizes, although Silver does not). At Smollett's refusal to surrender the map, Silver threatens an attack, and, within a short while, the attack on the stockade is launched. After a battle, the surviving mutineers retreat, having lost six men, but two more of the captain's group have been killed and Smollett himself is badly wounded.
When Livesey leaves in search of Ben Gunn, Jim runs away without permission and finds Gunn's homemade boat. After dark, he goes out and cuts the ship adrift. The two pirates on board, Hands and O'Brien, interrupt their drunken quarrel to run on deck, but the ship — with Jim's boat in her wake — is swept out to sea on the ebb tide. Exhausted, Jim falls asleep in the boat and wakens the next morning, bobbing along on the west coast of the island, carried by a northerly current. Eventually, he encounters the ship, which seems deserted, but getting on board, he finds O'Brien dead and Hands badly wounded. He and Hands agree that they will beach the ship at an inlet on the northern coast of the island. But as the ship is finally beached, Hands attempts to kill Jim, and Jim shoots and kills him. Then, after securing the ship as well as he can, he goes back ashore and heads for the stockade. Once there, in utter darkness, he enters the blockhouse — to be greeted by Silver and the remaining five mutineers, who have somehow taken over the stockade in his absence.
Silver and the others argue about whether to kill Jim, and Silver talks them down. He tells Jim that, when everyone found the ship was gone, the captain's party agreed to a treaty whereby they gave up the stockade and the map. In the morning Dr. Livesey arrives to treat the wounded and sick pirates, and tells Silver to look out for trouble when they find the site of the treasure. After he leaves, Silver and the others set out with the map, taking Jim along. Eventually they find the treasure cache — empty. Two of the pirates charge at Silver and Jim, but are shot down by Livesey, Gray, and Ben Gunn, from ambush. The other three run away, and Livesey explains that Gunn has long ago found the treasure and taken it to his cave.
In the next few days they load the treasure onto the ship, abandon the three remaining mutineers (with supplies and ammunition) and sail away. At their first port, where they will sign on more crew, Silver steals a bag of money and escapes. The rest sail back to Bristol and divide up the treasure. Jim says there is more left on the island, but he for one will not undertake another voyage to recover it.