David Wilson is called "Pudd'nhead" by the townspeople, who fail to understand his combination of wisdom and eccentricity. He redeems himself by simultaneously solving a murder mystery and a case of transposed identities. Two children, a white boy and a mulatto, are born on the same day. Roxy, mother of the mulatto, is given charge of the children; in fear that her son will be sold, she exchanges the babies. The mulatto, though he grows up as a white boy, turns out to be a scoundrel. He sells his mother and murders and robs his uncle. He accuses Luigi, one of a pair of twins, of the murder. Pudd'nhead, a lawyer, undertakes Luigi's defense. On the basis of fingerprint evidence, he exposes the real murderer, and the white boy takes his rightful place.