The Tragedy of Pudd'nhead Wilson juggles three plot lines, which all come together in a murder trial at the novel's end. Pudd'nhead Wilson is a Northerner who comes to the small Missouri town of Dawson's Landing to build a career as a lawyer. Immediately upon his arrival he alienates the townspeople, who don't understand his wit. They give him the nickname "Pudd'nhead" and refuse to give him their legal work. He scrapes by on odd work and spends most of his time dabbling in scientific hobbies, most notably, fingerprinting.

Roxana, or Roxy, is a beautiful slave who can pass for white, though she is one-sixteenth Black. To save her infant son from ever being sold away from her, she switches him with the child of her white master, who looks just like her son and was born on the same day. Her son Chambers, now called "Tom," grows up as a white man and heir to an estate. Her master's child, Tom, now called "Chambers", grows up a slave. "Tom" grows into a cruel, cowardly man. His gambling debts lead him, under Roxy's guidance, to rob houses, sell the now-freed Roxy as a slave, and finally to murder his uncle, Judge Driscoll, in a botched robbery attempt.

Luigi and Angelo are former sideshow performers. Good-looking and charming, they claim to be Italian twins, heirs of a deposed nobleman. They arrive in Dawson's Landing to rent a room in Widow Cooper's house, claiming they are tired of the bustle of the world. Luigi confesses to Pudd'nhead Wilson, who has read his palm, that he once killed a man who tried to steal a fabulous Indian knife from the brothers. This knife is stolen by "Tom" and used to kill Judge Driscoll. Luigi gets into an argument with "Tom," who has him arrested. The judge is mortified that "Tom" has compromised the family honor by doing that, and he instead challenges Luigi to a duel. No one is killed, but "Tom," to save his own reputation, tells his uncle that Luigi is a confessed assassin and therefore not an honorable man to duel. The twins, initially popular in the town, lose their reputation through the judge's claims against them, and lose in an election for city offices in which Pudd'nhead Wilson is elected mayor. Shortly after the election, "Tom," badly in debt and needing money to pay off the man to whom he has fraudulently sold Roxy, murders the judge with the twins' knife while he is robbing him.

"Tom" escapes disguised as a woman after killing his uncle. The twins, out for a walk, hear the judge's cries and rush to help. They are found standing over the body and their bloody knife is on the floor. They are brought to trial for the murder. Pudd'nhead Wilson, who is their attorney, through his fingerprint collection and a few lucky accidents, discovers that "Tom" is the murderer and that he is not the real Tom but Chambers. The twins are redeemed and freed, but soon leave for Europe. "Tom" is thrown in jail and then, since it is now known he is a slave, sold "down the river" to pay debts from the estate of the real Tom's father. "Chambers," revealed to be Tom, is given back his place as a white man and heir, but, raised as a Black man and marked by his Black speech patterns, he now fits into society nowhere. Pudd'nhead is mayor of Dawson's Landing and finally a success as a lawyer, but none of his old friends are around anymore to enjoy his success with him.