Roxy, thinking about Percy Driscoll's recent fit of rage, realizes that her son Chambers could some day be sold "down the river" and away from her. She decides to murder her child and commit suicide, rationalizing that the baby will be much better off in heaven. She changes into a new dress and picks up Chambers. Ashamed at his shabby gown, she puts him in one of Tom's beautiful white ones. Suddenly she is struck by his resemblance to the other baby, and she has an idea: she will switch the infants so that if anyone is sold down the river, it will not be her biological child. She remembers hearing a story about a similar switch in church; since that switch was perpetrated by a white woman, Roxy decides that her own action is acceptable. She quickly swaps the babies' clothing and practices speaking harshly to "Chambers" while coddling "Tom". No one will notice the switch, she is certain, particularly since Percy Driscoll's other slaves are going to be sold. The only man who worries her is Pudd'nhead Wilson, with his fingerprints project. Roxy knows that Pudd'nhead is not a fool, but actually the smartest man in town. She figures that if he doesn't notice the switch nobody will. To test this, she takes the children to be fingerprinted again. He takes the prints and files them without looking at them, then admires the babies. He does not notice the switch.
"Tom" grows into a terrible brat. He is fussy, sickly, and abusive to "Chambers", who is his exact opposite: healthy, mild, and obedient. "Chambers" is beaten by Percy Driscoll whenever he fights back, so he soon learns to check himself. He becomes the cowardly "Tom"'s bodyguard, fighting bullies at school for him and even saving his life once when "Tom" nearly drowns. "Tom" is mortified at being saved by a slave and claims he was only pretending to struggle in the water. A crowd of boys jeers at him and so "Tom" orders "Chambers" to fight them. Vastly outnumbered, "Chambers" protests but "Tom" insists, and then attacks "Chambers" with a knife, nearly killing him. "Tom" has also become exceedingly cruel to Roxy. She is disappointed but also secretly happy to see her son, legally a black man, in a position of such power.
In 1845 Percy Driscoll dies. On his deathbed he frees Roxy and names his brother, Judge Driscoll, "Tom"'s guardian. The judge has secretly bought "Chambers" from Percy because he knows that "Tom" would have tried to sell him "down the river" after Percy's death. This would have caused a public scandal, for it is not the way to treat a "family servant." Shortly after Percy's death, his fortune, built on speculation, disappears, but the judge reassures "Tom", telling him that he will be the heir to the judge's fortune. A free woman now, Roxy decides to take a job on a steamboat. Going around to say her goodbyes, she runs into Pudd'nhead Wilson, who teases her about leaving her boys and offers to copy their fingerprints for her. She wonders if he suspects anything, and, seeing the panic on her face, he wonders why his experiments have always bothered her. Not knowing the truth, he attributes it to superstition.
In creating a situation in which a white child gets a "black" upbringing and a (part) black child a "white" upbringing, Twain approaches the ancient "nature versus nurture" question from a new angle. Whether it is one's inherent (today we would say genetically-based) qualities or one's environment that determine one's personality has been of interest to authors throughout literary history. In this case Twain seems to deny that the question can be answered at all. Is it "Tom"'s genes or his spoiled upbringing as a wealthy white master that causes his sadism? Is it "Chambers"'s ancestry or his less protected childhood that makes him a calm, decent person? The novel makes no definitive claims. The issue is further confused by the hints given in the opening chapters about the father of Roxy's child (Chambers, who becomes "Tom", is said to be one- thirtysecondth black, while Roxy is one-sixteenth black, implying that his father is white). It is important, too, that Twain does not choose to make "Tom" noble and loyal to Roxy despite his upbringing: making him a stereotypically sentimentally good black character would have made this a boring story, while making him something of a villain leads to an interesting moral and philosophical situation.
Twain is somewhat sentimental in his treatment of Roxy. As in the last section, he rationalizes her behavior by considering her situation. In both cases (the potential theft of Driscoll's money and the switching of the babies) Roxy is guided by her churchgoing experiences. While in the first instance church has influenced her in the direction of conventional (that is to say, white) morality, which aligns with the legal code, in this situation she has been swayed in the opposite direction. She interprets creatively a story from a sermon, which is itself a creative interpretation of a Bible story (or perhaps an apocryphal creation of the preacher), to legitimate her "wrong" behavior. In both cases she has acted in accordance with a sentimental idea of "nobility" that has been perpetrated by a black church. The alignment of the black church with a largely white sentimental notion further confuses categories of both identity and morality: is the church betraying black people by telling them not to steal from whites? Or is it subverting the white establishment by supporting the alteration of one's racial identity? Which is the true "white ideology": the economic one to which Roxy submits once and resists the second time, or the sentimental one that she twice upholds? The murkiness of these ideological categories is cut through by the presence of Pudd'nhead Wilson, who frightens Roxy with his possession of the truth and who unwittingly threatens her with it.