The novel opens in February 1830 in the small Missouri town of Dawson's Landing. A young New York lawyer, David Wilson, arrives in the town, seeking his fortune. Shortly after his arrival, Wilson hears a dog barking and notes that he wishes he owned half of the dog. When a town resident inquires why Wilson desires half ownership, he replies so that he can kill his half. As a result of this odd remark, the people of Dawson's Landing conclude that Wilson must be an idiot, and give him the nickname "Pudd'nhead," which will stick with him for the next two decades.
Now labeled a fool, Wilson becomes something of a town outcast. He attempts to launch a law practice, but his tarnished reputation prevents him from attracting any clients. Subsequently, he gives up trying to pursue a legal career, and instead performs some accounting and surveying work (though not much). In his ample free time, Wilson pursues such hobbies as palmistry and fingerprinting.
In pursuit of his hobby, Wilson seizes every opportunity to collect the fingerprints of Dawson's Landing's residents. One of his subjects is Roxy, one of Percy Driscoll's slaves, who appears to be white, but is in fact 1/16 black. Wilson also collects prints from the two infants Roxy is caring for; one of these boys is her son, Chambers, while the other is her master's son, Tom. The two babies are remarkably similar in appearance, and Tom's own father cannot even tell them apart, but for their attire.
One day, Percy Driscoll accuses his slaves of stealing some of his belongings. When no one confesses to the crime, Driscoll threatens to send all four servants "down the river" (the worst possible fate for a Missouri slave, as this refers to be sold to a Southern cotton plantation, where slave conditions are considerably harsher). It turns out Roxy is the only slave who had not stolen from the master, and she is able to avoid punishment. Nonetheless, this incident alerts her to the fact that as a slave, she lives in constant danger of being sold down the river. More importantly, when her child grows up, he too will be a slave and have to face this danger.
Roxy bemoans this fate as cruel and unjust. Rather than subject her child to the danger of being sold down the river, she resolves to kill herself and her son. However, as she is about to depart to commit the act, an idea suddenly dawns on her. Realizing her master can only distinguish between the children by their attire, she switches the infants' clothes, and swaps them from one crib to the other. In doing so, Roxy ensures that her son will be raised white, wealthy, and privileged with no fear of being sold to a plantation. At the same time however, her actions condemn young Tom to a life of servitude.
Tom (the usurper) is a spoiled, fractious baby whose every desire is attended to. By contrast, Chambers (the true heir) grows up meek and docile. As he grows older, Tom becomes a cruel slave owner. He is particularly nasty to Roxy and Chambers. During the autumn of Tom and Chambers' fifteenth year, Percy Driscoll dies. Shortly before his death, Percy releases Roxy, who decides to become a chambermaid on a steamboat. Chambers and Tom go to live with Percy's brother, Judge Driscoll -- Dawson's Landing's chief citizen. Though Percy's failed land speculations left his son a pauper, the Judge promises Tom his inheritance. Tom later goes away to school at Yale, where he picks up the bad habits of gambling and drinking.
The Widow Cooper (affectionately called "Aunt Patsy" by the townspeople) is another resident of Dawson's Landing. She lives with her sons and her daughter, Rowena. To bring in some additional revenue, Aunt Patsy puts out an ad, offering to rent one of rooms in her home. The ad is answered by Luigi and Angelo Capello, a set of Italian twins who offer to pay double for the room. The brothers eventually arrive in Dawson's Landing, and are the most cultured, sophisticated pair the town has ever seen. They become instant celebrities, and are regarded as near-royalty. Luigi and Angelo quickly befriend Pudd'nhead Wilson.
After eight years as a chambermaid on a steamboat, Roxy's rheumatism has forced her to retire. Though she had saved up a fair amount of money, her bank failed, taking her savings with it. She was thus left a pauper, and returned to her hometown of Dawson's Landing. She hopes that the years have softened Tom (who is in reality her son), and that he will be pleased to see her. However, Tom displays his usual cruelty during their reunion. She then reveals to the boy that he was in fact born a slave, and is her son. Further, she demands that he pay her half of the monthly allowance he receives from the Judge, or else she will reveal his true slave identity. Tom agrees to pay his mother, and reveals to her that in order to pay off his considerable gambling debts, he has been robbing town residents, while disguised in women's clothing.
Luigi and Angelo are later invited to a meeting of the local rum party. At the gathering, Tom inadvertently insults Luigi in front of the crowd. Outraged by this public affront, Luigi delivers a massive kick, which launches Tom straight into the audience. Soon a riot breaks out and the meeting hall catches on fire.
The next day, Judge Driscoll learns of the attack on his nephew. Though angered by this assault on his family's name, the real rage emerges when he learns that rather than honorably engage Luigi in a duel to win back his dignity, Tom resorted to the legal system, filing an assault charge against the Italian. When Judge Driscoll confronts his nephew about it, Tom responds that he is too afraid to fight Luigi. Judge Driscoll is outraged and cannot stomach the disgrace. He promptly rips up his will, disinheriting Tom, and then resolves to take Tom's place and challenge Luigi to a duel himself.
Luigi readily accepts the Judge's challenge. This earns him the Judge's praise and admiration, who notes that it's a privilege to meet such an honorable man in battle. Luigi gets wounded in the duel, though no one is killed. Afterward, the town celebrates the duel's participants (as well as their seconds, Pembroke Howard and Pudd'nhead Wilson) as heroes.
Recognizing how much trouble her son faces on account of his gambling debts, Roxy offers to let him sell her into slavery for $600. The plan is for Tom to find a farm somewhere upcountry, to use the proceeds from the sale to pay off his obligations, and then to buy his mother out of slavery a year later. However, he ultimately betrays Roxy, and, unbeknownst to her, sells her down the river. On this new plantation, she suffers cruel, harsh treatments, as the master's wife is jealous of Roxy's beauty.
Roxy eventually escapes from the plantation and meets up with Tom in St. Louis, where she confronts him. She tells Tom that he must confess what he has done to Judge Driscoll and ask the Judge for some money, so that he can buy Roxy back (and thereby end the master's search for her). Tom decides to instead rob his uncle to get the money.
While attempting to rob his uncle, Judge Driscoll awakens and seizes Tom. Using a knife he stole from Luigi and Angelo, Tom stabs and murders the Judge. He flees out the back, disguised as an old woman. In the meantime, Luigi and Angelo -- who were out for a walk and heard the struggle -- arrive at the murder scene and find the slain Judge. Because they were at the scene and because their weapon was used to kill him, the twins are suspected and arrested for Judge Driscoll's murder. Pudd'nhead Wilson agrees to defend them.
The state has a strong, circumstantial case against Luigi and Angelo, while Wilson only has a very weak defense. Tom is feeling quite confident that the twins will go down for his crime, and that he will get off without any punishment. He is so confident, in fact, that he goes over to Pudd'nhead Wilson's house to boast. In doing so, he inadvertently leaves a fingerprint on one of Wilson's slides. This clue soon leads Wilson to the truth, both about Judge Driscoll's murder and Tom's true identity.
The next day in court, Wilson is able to conclusively prove, through fingerprint evidence, that Luigi and Angelo were not the murderers. He then dramatically reveals that Tom is the true culprit. He further explains that Roxy switched the infants at birth and that Tom is in fact Chambers, a slave.
In the end, Luigi and Angelo are fully exonerated, but decide they have had enough of the American frontier, and move back to Europe. Pudd'nhead Wilson becomes a "made man," who is widely praised and respected in Dawson's Landing. Chambers (the true heir) suddenly finds himself free, wealthy, and white. However, because of his upbringing, he remains illiterate, with the speech and manners of a slave. As such, he is completely uncomfortable in his new surroundings, and longs for the comfort of the slave gallery. Meanwhile, Tom is pardoned by the governor, and sold down the river to pay off the debts Percy Driscoll left behind when he died.