From the longer Wikipedia page 
"The Gold-Bug" is a short story by Edgar Allan Poe. Set on Sullivan's Island, South Carolina, the plot follows William Legrand, who was recently bitten by a gold-colored bug. His servant Jupiter fears Legrand is going insane and goes to Legrand's friend, an unnamed narrator who agrees to visit his old friend. Legrand pulls the other two into an adventure after deciphering a secret message that will lead to a buried treasure.
The story is often compared with Poe's "tales of ratiocination" as an early form of detective fiction. Poe became aware of the public's interest in secret writing in 1840 and asked readers to challenge his skills as a code-breaker. Poe took advantage of the popularity of cryptography as he was writing "The Gold-Bug", and the success of the story centers on one such cryptogram. The characterization of Legrand's servant Jupiter has been criticized as racist from a modern perspective, especially because his speech is written in dialect and because of his often-comical dialogue.
Poe submitted "The Gold-Bug" as an entry to a writing contest sponsored by the Philadelphia Dollar Newspaper. His story won the grand prize and was published in three installments, beginning in June 1843. The prize also included $100, likely the largest single sum Poe received for any of his works. "The Gold-Bug" was an instant success and was the most popular and most widely read of Poe's works during his lifetime. It also helped popularize cryptograms and secret writing.