Eleven-year-old Jack works with his brother, Daniel, in a New York City factory in 1904. After Daniel dies in a fire, Jack’s out-of-work father decides the family can’t afford to keep Jack around. Jack’s parents put him on an orphan train to Kansas. Francis, also 11, and her younger brother, Harold, are sent from their orphanage to the orphan train as well. Francis and Harold meet Jack as the train chugs west. The kids hear rumors that cruel taskmasters and poor living conditions await them when they arrive in Kansas. Jack hatches a plan to help the three escape.
Jack, Francis and Harold jump off the train when it slows and flee into the woods. There, they wander through the darkness until they meet Alexander. Alexander came to Kansas on an orphan train as well. He was sent to the farm of a man named Pratcherd, where he and other kids were treated badly and used as laborers. Alexander escaped and lives in the forest near the town of Whitmore, Kansas. When he needs food and supplies, he “liberates” them from the locals. He calls his spot Wanderville and says it’s a place where children can be free.
At first the kids aren’t too impressed with Alexander’s so-called town. They help him steal supplies from Whitmore, and he teaches them survival skills, such as how to build a fire. Alexander hangs stolen sheets and repositions logs, giving some shape to the city of Wanderville. Before long, their new place begins to feel like home.
The kids are in Whitmore taking more supplies when Harold wanders off. The sheriff finds him, and learning he’s been on the orphan train, sends him to Pratcherd’s farm. The kids devise a plan to save him and the other children there, and Jack and Alexander are captured in the process. When the boys don’t return from their rescue mission, Francis tells a group of townspeople she’s afraid her brother is dead. Her lie causes them to go to Pratcherd’s ranch, where they see how the children are treated. While the adults argue with Pratcherd, the kids escape in a wagon, along with other orphans from the ranch.
Six new children become citizens of Wanderville, but the group realizes it won’t be able to stay in that location much longer. The kids decide it doesn’t matter where Wanderville is, as long as they’re together and able to help other kids gain freedom. They decide to be a town that wanders, and they consider heading for California.