The main character in the story is William Legrand, a man who lives at Sullivan's Island, near Charleston, South Carolina, to escape from his misfortunes. Legrand discovers a brilliant gold-colored bug, but lends it out to someone else. When his friend, the narrator of the story, visits Legrand, he is told about the rare bug with a death's-head on its back, and Legrand draws him a picture of the bug on a piece of paper. A short while later, Legrand asks his friend to come visit him immediately. Upon the friend's arrival, the strangely behaving Legrand asks his friend to follow him on an expedition into the woods near some rocks, to search for a treasure. Afraid that Legrand has lost his mind, the friend decides to accompany him out of concern for Legrand's health. As it turns out, Legrand accidentally had discovered a secret message in invisible writing on the paper he used to draw the bug. Legrand later explains his friend how he found the message and how he was able to decrypt the message that started his quest for a hidden treasure.