The town of Hadleyburg is known far and wide as an honest and moral community. The townspeople are proud of this reputation—so much so that they pass along the principles of honesty when their children are still babies, keeping them sheltered from any kind of temptation that might threaten their moral integrity. Unfortunately, the citizens are so concerned with themselves and their reputation that they pay little attention to outsiders. As a result, they accidentally offend a passing stranger. This stranger vows to take revenge, deciding that the best way to do this will be to corrupt the town and prove that its nineteen most well-respected members (called the “Nineteeners”) are immoral and dishonest.
One night, the stranger goes to the house of the bank cashier, Edward Richards. Edward hasn’t yet come home, so the stranger speaks to his wife, Mary, telling her he has something he needs to leave with Edward. He then gives her a sack and leaves. The sack, Mary discovers, contains $40,000 worth of gold. Edward is ecstatic when he comes home, telling his wife that they should bury the sack before anyone else hears about it. Shortly thereafter, though, the couple decides to follow the instructions affixed to the sack, which say that Edward should find the person who deserves the gold.
In his note, the stranger explains that he was once an impoverished gambler, but that somebody in Hadleyburg gave him $20 and said something to him that changed his life. Since then, he has become rich and quit gambling, and now he wants to reward the person who helped him—but he doesn’t know who that person was. As such, his note tells Edward that the deserving man should submit a note, upon which he should write the phrase he uttered to the stranger on that fateful night. If this phrase matches the one contained in another sealed envelope inside the sack, then the gold should be given to the claimant without question.
Edward has two choices: he can conduct the inquiry privately, or he can make the matter public. If he decides to conduct things publicly, the note says, Reverend Burgess should collect the submissions and read them aloud in the town hall a month later. This confuses Edward and Mary, since Reverend Burgess has been disgraced, the town having turned on him because of some unfavorable (and unexplained) event. What people don’t know, though, is that Edward could have proved Burgess’s innocence but decided not to because he didn’t want to get swept up in the scandal. Of course, his failure to help Burgess weighed on his conscience, and so he snuck over to the reverend’s house to warn him just before the citizens of Hadleyburg appeared to run him out of town. Since then, Burgess has been deeply grateful.
After telling Mary this story (which she didn’t previously know), Edward decides it would be best to conduct the inquiry under the public eye, so he goes to the printing office, where he tells Mr. Cox, the publisher, what has happened. Upon returning home, he and Mary come to regret their decision, wishing they’d kept the money for themselves. Thinking this way, Edward returns to the printing offices to stop them from distributing the papers. Once again, he meets Mr. Cox, who has just had a similar conversation with his own wife and who also wants to keep the money. When they arrive at the offices, though, they learn that the papers have already shipped out for delivery.
Everyone in town assumes the person who helped the stranger must have been Barclay Goodson, the only person in Hadleyburg anyone can imagine doing such a thing. Unfortunately, Goodson has recently died, so he can’t claim the reward. Before long, each of the Nineteeners receive letters from an unknown man named Howard Stephenson, who explains that he thinks they deserve the sack of gold. In the letters, Stephenson upholds that Barclay Goodson was indeed the one who helped the stranger. He knows, he says, because he was there, too. According to Stephenson, he was with Goodson and heard the remark that will win the claimant the gold. He also tells each Nineteener (in their separate letters) that Goodson privately praised him (the Nineteener in question) on that very night. For instance, Stephenson tells Edward that Goodson spoke well of him, saying that apparently Edward did some great service for Goodson. This service, Stephenson writes, is not necessarily something Edward would remember, but he should rest assured that Goodson wanted to repay him for his kindness, whatever it was. Stephenson’s letter says: “I remember [Goodson] saying he did not actually LIKE any person in the town—not one; but that you—I THINK he said you—am almost sure—had done him a very great service once… and he wished he had a fortune, he would leave it to you when he died... Now, then, if it was you that did him that service, you are his legitimate heir, and entitled to the sack of gold.” He then tells Edward (and every other Nineteener) the remark that will win him the sack of gold: “YOU ARE FAR FROM BEING A BAD MAN: GO, AND REFORM.”
The Nineteeners are overjoyed by Stephenson’s letters, though they’re hesitant at first because they can’t think of any reason why Goodson would want to repay them. As the days pass, however, they slowly convince themselves that they did, in fact, help Goodson in some profound way. As a result, all nineteen of them send notes to Reverend Burgess saying the same thing.
Finally, the day comes to decide who deserves the gold. Not only does all of Hadleyburg pack into the town hall, but out-of-town reporters and spectators arrive to witness the event. Burgess opens the first note, reads it aloud, and reveals that Deacon Billson was the one who wrote it. As Billson stands to accept the reward, Lawyer Wilson does the same, thinking Burgess said his name. The two men argue about who truly wrote the note, and Wilson accuses the deacon of having stolen his response. Burgess then opens Wilson’s note and reads it aloud, at which point the crowd discovers that both men have submitted the same answer. Because Wilson is a lawyer, he manages to convince everyone that Billson is guilty of pilfering his original note and writing his own. Before he can fully claim the prize, though, Burgess reminds the crowd that he isn’t supposed to open the sack to compare its remark until all submissions have been read aloud. So begins a raucous progression, as the Nineteeners and their dishonest ways are revealed one by one (in that they have all submitted the same remark), much to the audience’s wild delight. At one point, Edward stands up to try to stop the process before his name is called, but Burgess cuts him off, assuming he’s trying to help the other disgraced men. He tells Edward that everyone knows he’s a good man, but that he shouldn’t pity the other dishonest Nineteeners. Edward sits down once more, awaiting his own public humiliation. Miraculously, though, Burgess stops before revealing Edward’s name, saying that he has reached the end of the submissions. At this point, he opens the letter inside the sack, which reveals that there never was a gambler or a test-remark. The stranger explains his plan to corrupt Hadleyburg, insisting that the town is weak because it has never had its “virtues” “tested in the fire.”
Because the townspeople are so proud of Edward for not succumbing to the stranger’s temptations like the other Nineteeners, they start bidding on the sack of gold, which they’ve discovered is nothing more than a pile of lead disks. Their goal is to raise money to give to Edward. During this process, an unknown man drives the bidding up, eventually winning the sack for $1,282. He then stands up and says that he deals in the field of rare commodities, explaining that, because this event has been so widely publicized, the lead coins might actually fetch a large sum of money—especially if he stamped the names of the disgraced eighteen men onto them.
Next, one of the Nineteeners—“Dr.” Harkness, who is currently running a political race against Pinkerton (another Nineteener)—discreetly offers to buy the sack. Harkness and Pinkerton are the two richest men in town, and Harkness ends up arranging with the stranger to secretly buy the lead for $40,000. The next day, he meets the stranger and writes several checks, which together equal the agreed upon amount. The stranger then puts these checks in an envelope and delivers them to Edward and Mary. Upon receiving the envelope, Mary recognizes the stranger as the same person who originally delivered the gold, and the couple realizes that he must also be Howard Stephenson. As such, they know they can’t cash these checks, since they probably bear Stephenson’s name, which is too scandalous to associate themselves with. But before Edward throws the checks into the fire, he sees they’re actually signed by Harkness. Confused, he decides to keep them, though he doesn’t cash them. Just then, a letter from Burgess arrives. In it, the reverend explains that he chose not to read out Edward’s name because he felt he owed him, since Edward warned him when the citizens of Hadleyburg were about to attack him. This letter only puts Edward and Mary further on edge and exacerbates their guilt, since Edward could have done a lot more than simply warn Burgess—he could have cleared the man’s name altogether.
In the weeks proceeding the town hall meeting, Edward and Mary grow paranoid that the town will discover their dirty secret. Edward even begins to believe that Burgess intends to out him. Eventually, the pressure becomes too much, and they both fall ill, and Edward destroys the checks. On his deathbed, Edward gathers Burgess and several witnesses and confesses that Burgess lied in order to save him. Burgess tries to deny this, but Edward insists, not knowing that he’s once again harming Burgess’s reputation. He then dies, shortly followed by Mary.
In the aftermath of this scandal, Hadleyburg changes its name, and Harkness wins the election by printing Pinkerton’s name on all of the lead coins. The town also alters its motto from “LEAD US NOT INTO TEMPTATION” to “LEAD US INTO TEMPTATION.” “It is an honest town once more,” Twain writes, “and the man will have to rise early that catches it napping again.”