When Jim goes to Bristol and visits Long John Silver at the Spy Glass tavern, his suspicions are immediately aroused: Silver is missing a leg, like the man Bones warned about, and Black Dog is sitting in the tavern. Black Dog runs away at the sight of Jim, and Silver denies all knowledge of the fugitive so convincingly that he wins Jim's trust. Despite Captain Smollett's misgivings about the mission and Silver's hand-picked crew, the Hispaniola sets sail for the Caribbean Sea. As they near their destination, Jim crawls into the ship's apple barrel to get some apples. While inside, he overhears Silver talking secretly with some of the other crewmen. Silver admits that he was Captain Flint's quartermaster and that several of the other crew were also once Flint's men, and he is recruiting more men from the crew to his own side. After Flint's treasure is recovered, Silver intends to murder the Hispaniola's officers, and keep the loot for himself and his men. When the pirates have gone back to their berths, Jim warns Smollett, Trelawney, and Livesey of the impending mutiny.
When they reach Treasure Island, the bulk of Silver's men go ashore immediately. Although Jim is not yet aware of this, Silver's men have given him the Black Spot and demanded to seize the treasure immediately, discarding Silver's own more careful plan to postpone any open mutiny or violence until after the treasure is safely aboard. Jim lands with Silver's men, but runs away from them almost as soon as he is ashore. Hiding in the woods, Jim sees Silver murder Tom, a crewman loyal to Smollett. Running for his life, he encounters Ben Gunn, another ex-crewman of Flint's who has been marooned three years on the island, but who treats Jim kindly in return for a chance of getting back to civilization. Later, Jim joins Trelawney, Livesey, and their men at an abandoned, fortified stockade on the island, until Silver and his pirates assault the stockade, but they are repulsed in a furious battle.
During the night, Jim sneaks out of the stockade, takes Ben Gunn's coracle and approaches the Hispaniola under cover of darkness. He cuts the ship's anchor cable, setting her adrift and out of reach of the pirates on shore. After daybreak, he manages to approach the schooner again and board her. Of the two pirates left aboard, only one is still alive: the coxswain, Israel Hands. He agrees to help Jim helm the ship to a safe beach in exchange for medical treatment and brandy, but once the ship is approaching the beach, Hands tries to murder Jim. Jim escapes him by climbing the rigging, and when Hands tries to stab him with a dirk, Jim shoots Hands dead. Having beached the Hispaniola securely, Jim returns to the stockade under cover of night and sneaks back inside. Because of the darkness, he does not realize until too late that the stockade is now occupied by the pirates, and he is easily captured. Silver, whose always-shaky command has become more tenuous than ever, seizes on Jim as a hostage, refusing his men's demands to kill him or torture him for information.
The following day, the enraged pirates turn on Silver and Jim, but Ben Gunn, Dr. Livesey and his men 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 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. Remembering Silver, Jim reflects that "I dare say he met his old Negress [wife], and perhaps still lives in comfort with her and Captain Flint [his parrot]. It is to be hoped so, I suppose, for his chances of comfort in another world are very small."