The story is told in the third person, focusing mainly on Cora. Scattered single chapters also focus on Cora's mother Mabel, the slavecatcher Ridgeway, a reluctant slave sympathizer named Ethel, and Cora's fellow slave Caesar.
Cora is a slave on a plantation in Georgia and an outcast after Mabel ran off without her. She harbors a great deal of resentment towards Mabel for escaping, although readers later learn that her mother, in an attempt to return to Cora, actually died from a snake bite and never reached her. Caesar approaches Cora about a plan to flee. Reluctant at first, she eventually agrees as her situation with her master and fellow slaves worsens. During their escape, they encounter a group of slavecatchers, who capture Cora's young friend Lovey. Cora is forced to kill a teenage boy to protect herself and Caesar, eliminating any possibility of merciful treatment should she ever be recaptured. With the help of an inexperienced abolitionist, Cora and Caesar find the Underground Railroad, depicted as a literal underground train system that runs throughout the south that transports runaways northwards. They take a train to South Carolina.
Upon learning of their escape, Ridgeway begins a hunt for the pair, largely in revenge for Mabel, who is the only escapee he has ever failed to capture. Meanwhile, Cora and Caesar have taken up comfortable residence in South Carolina under assumed names. South Carolina is enacting a program where the government owns former slaves but employs them, provides medical treatment, and gives them communal housing. The two enjoy their time there and put off the decision to leave until Cora learns of plans to sterilize black women and use black men as test subjects in an experiment to track the spread of syphilis. Ridgeway arrives before the two can leave, and Cora is forced to return to the Railroad alone. She later learns that Caesar was killed by an angry mob after having been caught and jailed by Ridgeway.
Cora eventually arrives in a closed-down station in North Carolina. She is found by the son of the station's former operator, Martin. North Carolina has recently decided to abolish slavery, using indentured servants instead, and violently executing any runaway slaves found in the state (as well as some freedmen). Martin, terrified of what the North Carolinians might do to an abolitionist, hides Cora in his attic for several months. Eventually, Cora becomes ill and is reluctantly treated by Martin's wife Ethel. While Cora is down from the attic, a raid is conducted on the house, and she is recaptured by Ridgeway.
Ridgeway takes Cora back toward Georgia, detouring through Tennessee to return another slave to his master. While stopped in Tennessee, Ridgeway's travelling party is attacked by some escaped slaves, who release Cora. Cora travels to a farm in Indiana owned by a free black man named Valentine, along with one of her rescuers, a man called Royal. The farm is populated by a number of freedmen and escapees, living and working in harmony. Royal, who is an operator on the Railroad, begins a romantic relationship with Cora, although she remains hesitant because of a rape by other slaves in her childhood. Unfortunately for the pair, a small faction of freedmen fears that their peaceful life will be ruined by the presence of escaped slaves, and tips off some slavecatchers to their presence. The farm is burned, and many people, including Royal, are killed in a raid by white Hoosiers. Ridgeway recaptures Cora and forces her to take him to a closed-down Railroad station nearby. When they arrive, she pushes him down a flight of stairs, severely injuring him. She then runs off down the tracks. Eventually, she emerges from the underground tracks to find a caravan traveling out West. She is given a ride by one of the wagons' colored drivers and the novel ends.