The Gold-Bug (1843): How Poe’s Cipher Story Revived the Captain Kidd Treasure Legend

1848 daguerreotype portrait photograph of Edgar Allan Poe

Forty years before Robert Louis Stevenson sent Jim Hawkins after a dead man’s chest, a struggling Baltimore writer won a newspaper contest with a story about a beetle, a scrap of parchment, and a buried fortune left behind by a real pirate. Edgar Allan Poe’s “The Gold-Bug” became his most popular work during his own lifetime, and it did more than almost any other single text to turn Captain Kidd from a hanged 17th-century privateer into American fiction’s favorite source of buried treasure.

A Beetle, a Scrap of Parchment, and a Dead Man’s Skull

Published in the Philadelphia Dollar Newspaper beginning 21 June 1843, “The Gold-Bug” follows William Legrand, a ruined gentleman living in isolation on Sullivan’s Island, South Carolina, who finds a strange gold-colored beetle wrapped in a scrap of parchment. Heat from a fire reveals invisible ink on the parchment: a skull, and a coded message. Legrand works out that the cipher gives directions to treasure buried by Captain Kidd, and that the skeletons eventually found near the gold are very likely the pirate’s own crew, killed to keep the burial site secret.

The Contest That Made It Poe’s Most-Read Story

Poe had already sold the story to Graham’s Magazine for $52 when he learned the Dollar Newspaper was running a fiction contest, bought it back, and entered it instead. He won the $100 grand prize — probably the largest payment he ever received for a single piece of writing — and the publicity paid off far beyond the prize money. Reprints spread the story widely, and by May 1844 Poe reported roughly 300,000 copies of “The Gold-Bug” in circulation, making it the most widely read work of his life, well ahead of anything else he wrote.

Breaking Captain Kidd’s Code

The cipher at the story’s center is a straightforward substitution code, in which Legrand painstakingly matches symbol frequency to letter frequency in English — a method Poe did not invent for the story so much as popularize through it. He had already built a reputation as an amateur cryptographer, challenging readers of Alexander’s Weekly Messenger to send him ciphers to solve as early as 1840, and had laid out his method in detail in the 1841 essay “A Few Words on Secret Writing.” “The Gold-Bug” let him dramatize that hobby as adventure fiction, with a real pirate’s legendary fortune as the prize for solving it.

The Skeleton Robert Louis Stevenson Borrowed

Stevenson later admitted the debt directly, writing of his own Treasure Island (1883) that “no doubt the skeleton is conveyed from Poe.” The borrowing goes beyond one grisly detail: the whole shape of the modern treasure-hunt story — a coded document, a race to decipher it, a journey to a real place built around a legendary pirate’s hoard — runs from Poe’s beetle-hunter on a South Carolina island straight through to Stevenson’s one-legged cook and his map marked with an X. Poe got there first, and did it with a cipher instead of a map.

Sources consulted: Wikipedia, “The Gold-Bug”; Encyclopaedia Britannica, “The Gold Bug.”

Leave a Reply