Treasure Island is a grim tale, and the author aimed to provide a moral message: Digging for private gold will only bring misery to the treasure-hunter.