Three boys, fifteen-year-old Ralph Rover (the narrator), eighteen-year-old Jack Martin and fourteen-year-old Peterkin Gay, are the sole survivors of a shipwreck on the coral reef of a large but uninhabited Polynesian island. At first their life on the island is idyllic; food, in the shape of fruits, fish and wild pigs, is plentiful, and using their only possessions; a broken telescope, an iron-bound oar and a small axe, they fashion a shelter and even construct a small boat.
Their first contact with other people comes after several months when they observe two large outrigger canoes land on the beach. The two groups are engaged in battle and the three boys intervene to successfully defeat the attacking party, earning the gratitude of the chief Tararo. The Polynesians leave and the three boys are alone once more.
Then more unwelcome visitors arrive in the shape of pirates, who make a living trading, or stealing, sandalwood. The three boys conceal themselves in a hidden cave, but Ralph is captured when he sets out to see if the pirates have left, and is taken aboard the pirate schooner. Ralph strikes up an unexpected friendship with one of the pirates, "Bloody Bill", and when they call at an island to trade for more wood he meets Tararo again. On the island he sees all facets of island life, including the popular sport of surfing, as well as the practice of infanticide and cannibalism.
Rising tension leads to an attack by the inhabitants on the pirates, leaving only Ralph alive and Bloody Bill mortally wounded. However they manage to make their escape in the schooner. After Bill dies, making a death-bed repentance for his evil life, Ralph manages to sail back to the Coral Island to be re-united with his friends.