Jim leaves Ben Gunn behind, but escapes the Hispaniola on Ben Gunn's coracle. Ben Gunn appears later making ghostly sounds to dissuade Long John Silver's rivals from continuing their search for the treasure, but Silver forges ahead and locates the place where Flint's treasure was buried. The pirates discover that a cache has been rifled and all of the treasure is gone.
The enraged pirates turn on Silver and Jim, but Ben Gunn and several others attack the pirates by surprise, killing two and dispersing the rest. Silver surrenders to Dr. Livesey, promising to return to his duty. They go to Ben Gunn's cave home, where Gunn has had the treasure hidden for some months. The treasure is divided amongst Squire Trelawney and his loyal men, including Jim and Ben Gunn, and they return to England, leaving the surviving pirates marooned on the island. Silver escapes with the help of the fearful Ben Gunn and a small part of the treasure.
Once in England, Ben Gunn manages to spend all his part of the treasure in just a few days and becomes a porter for the rest of his life.