The pirates stand dumbstruck, staring at the empty boxes. Long John Silver realizes that they will soon turn on him. He hands Jim a pistol and moves into position for a fight. Jim is glad to have a gun but disgusted at the way Silver’s loyalties change from moment to moment. “So you’ve changed sides again,” Jim mutters.
The other pirates leap into the hole that once held the treasure. Digging with their hands, they unearth a single two-guinea coin that has been left behind. They pass it around, shaking it angrily at Silver. They are furious—but they are also afraid to fight. George urges the others to attack; after all, they are only facing an “old cripple” and a “cub.”
At this moment, three musket shots ring out from the forest. George and another pirate fall, and the other three flee. Moments later, Dr. Livesey emerges from the trees with Ben Gunn and Abraham Gray. The doctor orders everyone to run through the trees and cut off the pirates’ access to the lifeboats, which are at a nearby shore. Silver—who knows that none of his new allies is particularly loyal to him—manages to keep up without any help.
When Jim and his friends arrive at the top of a hill, they see the three pirates running in the opposite direction from the boats. Reassured, they slow their pace, and Dr. Livesey explains why the treasure was no longer lying where Captain Flint put it.
Ben Gunn has been marooned on Treasure Island for years. He found Flint’s gold one day and realized that someone was sure to come back for it. Bit by bit, he moved it to the cave where he lives. When the doctor found out about the treasure’s new location, he quickly gave the pirates the stockade, the food from the ship, and the treasure map. Then he moved the loyal men into Ben Gunn’s cave to protect the treasure. Dr. Livesey pauses here to apologize for leaving Jim in danger. In the doctor’s view, he had to do what seemed best “for those who had stood by their duty.”
Continuing the story, Dr. Livesey explains what happened today when he learned that Jim had been captured. After leaving the stockade, the doctor quickly went and got help. He and his two companions rushed through the trees, but only Ben Gunn was fast enough to reach the site of the treasure before the pirates arrived. He stalled them by exploiting their superstitions, thus giving the doctor and Abraham Gray time to join the fight.
When this story is finished, Jim and his friends—along with Long John Silver—walk to the boats. They sink one so that the pirates will not be able to use it, and they row the other around the edge of the island to the Hispaniola, which has come adrift but is otherwise in good shape. They leave Gray on board to keep watch, and everyone else goes up to Ben Gunn’s cave.
In the cave, Jim finally sees Captain Flint’s treasure, an enormous, glittering pile of coins and gold bars. He thinks of the seventeen men who have died in the last few days and of the unknown number who died at the hands of Flint and his crew. In spite of these dark thoughts, he is glad that he and his friends have won.
Now that they are safe, everyone sits down to eat a hearty dinner. Long John Silver sits among them, behaving as though he has been honest and loyal throughout the adventure.