If Dupin sounds uncannily familiar, that’s because Sir Arthur Conan Doyle, like every other author of detective fiction, not to mention the creators of a thousand TV crime shows, is incalculably in Poe’s debt. “The children of Poe” is what Stephen King calls the members of his guild, and with good reason. But horror stories predate Poe, and have many other sources. Not so the literary sleuth. All detective stories and police procedurals begin with the intellectually imperious C. Auguste Dupin: methodical, eccentric, calculating—and insulting. We, mere readers, are so many Watsons, Hastingses, and Goodwins. Poe is the only Holmes.

Poe wrote his most popular story, “The Gold-Bug,” just before the nation at last emerged from depression. In January of 1842, his wife had begun to cough up blood; she was eventually consumed, as Poe’s mother had been, by tuberculosis. The squalid conditions in which the Poes lived didn’t help. Poe begged Graham for an advance of two months’ salary. In February, Poe wrote an unfavorable review of Dickens’s “Barnaby Rudge,” a novel about a village idiot and his talking raven that had been published, serially, in The New-Yorker. The next month, Poe met Dickens, who was on his American tour (during which Dickens coined the phrase “the almighty dollar”). By April, Poe had resigned his editorship of Graham’s Magazine, claiming that he found the magazine “namby-pamby,” but he had also taken to drinking again. (After Poe’s death, Graham, who was fond of him, commended his bookkeeping: “He kept his accounts, small as they were, with the accuracy of a banker.”) When Griswold replaced Poe as the editor of Graham’s, a friend of Poe’s printed a squib: “We would give more for Edgar A. Poe’s toe nail, than we would for Rueful Grizzle’s soul, unless we wanted a milk-strainer.” Shortly afterward, Poe reviewed Griswold’s “Poets and Poetry of America,” remarking that Griswold had included in his anthology many poets whom Poe deemed to be beneath contempt. The battle between Griswold and Poe shaped Poe’s legacy for a century.

“My only hope of relief is the ‘Bankrupt Act,’ ” Poe wrote in June. He peddled “The Mystery of Marie Rogêt,” a sequel to “The Murders in the Rue Morgue,” at a discount, telling an editor that Graham would have paid him a hundred dollars: “Of course I could not afford to make you an absolute present of it—but if you are willing to take it, I will say $40.” A friend who visited him that fall was mortified to find that Poe and his wife and Mrs. Clemm had a hard time coming up with anything to serve him. Then Poe offered to prostitute his magazine to the Tyler Administration. “It has been hinted to me that I will receive the most effectual patronage from Government, for a journal which will admit occasional papers in support of the Administration,” he wrote. “Of the government patronage, upon the condition specified, I am assured and this alone will more than sustain the Magazine.”

Early in 1843, Poe went to Washington, to lobby for that patronage, but he drank too much and abused his hosts. A journalist who met Poe on the streets of the capital found him seedy and woebegone. Just weeks later, Poe heard about a short-story contest, sponsored by the Dollar Newspaper. The prize was a hundred dollars: “Very Liberal Offers and No Humbug” read one version of the contest announcement. Poe had recently finished “The Gold-Bug,” and had sold it to Graham for fifty-two dollars. Thinking to earn that extra forty-eight dollars, he returned Graham’s money and submitted his story to the jury. He won first prize. The theme, another sign of the times, was clear enough: “The Banker’s Daughter” took second prize; third went to a story called “Marrying for Money.”

“The Gold-Bug” was printed in the Dollar Newspaper in June and July of 1843. Its Dupin-like protagonist, William Legrand, “had once been wealthy; but a series of misfortunes had reduced him to want.” Legrand lives on Sullivan’s Island, off South Carolina, with a Newfoundland and “an old negro, called Jupiter.” Jupiter tells a spooky story: Legrand has discovered a strange beetle and, ever since, has been puzzling “a syphon wid de figgurs on de slate—de queerest figgurs I ebber did see. Ise gitting to be skeered.” (Poe’s racism ran very deep.) Jupiter is the gothic tale-teller inside “The Gold-Bug,” not unlike Juniper, the gothic-tale-writing baboon of “How to Write a Blackwood Article.” In both stories, Poe divested himself of what he considered to be the darker side of his own authorship.

“The Gold-Bug” is a tangle of puns, many of them, as the literary scholar Marc Shell has pointed out, having to do with currency. Legrand has found a bug the color of gold. “De bug is a goole bug,” Jupiter says. In other words, a ghoul bug. It looks as if it were made of gold. It is not. “Dey aint no tin in him, Massa,” Jupiter says. There’s nothing in him—no tin, and no gold, either. Legrand has also found a parchment, made of goatskin, _kid_skin. It contains a map showing where a treasure was buried on the island by the pirate Captain Kidd. This pun Legrand himself has to figure out, in order to find the buried treasure. (Kidd’s map, in this sense, is itself a guide to Poe’s tales. Is Poe kidding or not? Are the tales a joke, and worthless, or brilliant, and priceless?) The parchment is covered with invisible ink, which, as Legrand discovers, conceals a cryptogram. After decoding the cipher, Legrand takes Jupiter, the dog, and the befuddled narrator on a hunt for the treasure, which turns out to be a chest containing jewels and gold coins.

Poe’s intent in writing “The Gold-Bug,” one reviewer noted, “was evidently to write a popular tale: money, and the finding of money being chosen as the most popular thesis.” When a critic called the prize “A Decided Humbug” and suggested that no editor could possibly have paid Poe a hundred dollars for such “unmitigated trash,” Poe sued for libel and won a retraction. Still, the story is a kind of hoax. It aspires to popularity by assaulting the very idea of a popular audience. Poe’s tales, like paper money, promise value even as they flaunt their worthlessness. Like the beetle of its title, “The Gold-Bug,” the story, is “no tin,” too.

After “The Gold-Bug,” Poe’s life went from bad to worse. In late 1843, when his friends heard that his wife and his mother-in-law were starving, they gave him fifteen dollars, only to come across him, an hour later, drunk and in the street. In 1844, Poe was down to his last four and a half dollars. The publication of “The Raven” the following year didn’t rescue him from poverty, but it did propel him, almost overnight, to literary celebrity. This he simply sabotaged. He became the editor and then the owner of The Broadway Journal, a New York weekly. But the tone of his criticism grew more rancorous, especially with the ill-advised publication, in Godey’s Lady’s Book, of a series of sketches called “The Literati of New York City: Some Honest Opinions at Random Respecting Their Authorial Merits, with Occasional Words of Personality.” Invited to Boston to recite a new poem, he read, instead, a poem that he later said he had written as a child (and subsequently, in The Broadway Journal, confessed, without apology, that he had been drunk). He tried to keep the magazine afloat, writing to a friend, “So help me Heaven, I have sent and gone personally in all the nooks & corners of Broker-Land & such a thing as the money you speak of—is not to be obtained.” The Broadway Journal folded in 1846. Virginia Poe’s prolonged illness left her husband in tatters. “I drank, God only knows how often or how much,” Poe admitted. He had a breakdown. His wife died in January of 1847. Toward the end of his own life, Poe may have descended again into lunacy. “I was never really insane, except on occasions where my heart was touched,” he insisted, just months before his death, when he was, at best, disordered to the point of necromaniacal incoherence: “I have been taken to prison once since I came here for getting drunk; but then I was not. It was about Virginia.” The cause of his death remains mysterious.