At a remote Catholic orphanage in Poland in 1942, young Felix discovers an entire carrot in his soup. Because the orphans get so few vegetables, he reasons that his parents must have sent the carrot as a message that they’re coming back. They left him at the orphanage almost four years before, telling him they had to take care of their bookselling business. He worries they won’t recognize him when they arrive, but he plans to show them his notebook, where he’s written stories about their adventures.
The next morning, a car arrives at the orphanage. Felix hopes it’s his parents, but it turns out to be men in armbands. Felix, disappointed, decides to ask the orphanage’s head nun Mother Minka when his parents will arrive. One of the men finds Felix in Mother Minka’s office and speaks threateningly to him in a foreign language. Mother Minka bursts in and drags Felix out by the ear. She explains that the men in armbands are Nazis who discovered she was hiding Jewish books—but they haven’t discovered that Felix is Jewish. Felix assumes that Nazis are a group with a vendetta against Jewish books, not Jewish people. Worried for his bookseller parents, Felix asks about the carrot they left and when they’re coming. Mother Minka explains that one of the nuns, feeling sorry for Felix, snuck the carrot into his soup. Felix refuses to believe her. He resolves to find his parents and warn them about the Nazis.
Felix escapes the orphanage and walks to his hometown. Hearing voices in the apartment attached to his parents’ bookshop, Felix looks for them—only to find the family of Wiktor Radzyn, Felix’s former classmate. When they try to catch Felix, he runs away. Later, another neighbor snatches Felix into an alley and explains that Nazis took Felix’s parents and all the other Jewish people to the city. He advises Felix to hide.
Felix, traveling to the city, comes upon a burning house. In the yard he finds a man and a woman shot to death. Assuming the couple were Jewish booksellers who resisted Nazi attempts to burn their books, Felix sits down and cries. Then he spots an unconscious little girl. When he hears a car coming, he picks up the girl and flees. Eventually, he stops to rest behind a hedge. He learns the girl’s name is Zelda and that she doesn’t know her parents have been shot. Rather than break the news to her, he tells her a story to calm her down while they rest. Having fallen asleep, Felix—who is starting to feel sick—wakes and hears voices coming from the direction of the road. When he peers through the hedge, he sees Nazis yelling at Jewish travelers wearing armbands marked by the Star of David. Then Zelda screams. Felix turns and sees a Nazi pointing a gun at her head. The Nazi gestures at them with the gun to join the crowd. As they walk toward the city, Felix tells Zelda stories and tries to prevent her from witnessing Nazi acts of violence.
By the time the crowd reaches the city, Felix is sick and exhausted. He collapses in the street as Zelda screams and a Nazi points a gun at her. Suddenly, a man wearing a Jewish armband appears, speaking to the Nazi in a language Felix doesn’t understand and brandishing a leather bag. The Nazi leaves Zelda alone but shoots another woman. Felix faints. Felix and Zelda’s rescuer, Barney, takes them to a hidden cellar, where he introduces him to some other children. Later, the other children explain to Felix that they’re hiding from the Nazis because the Nazis hate all Jewish people. Felix realizes his parents colluded with Mother Minka to pretend he was Catholic in order to save his life.
After Felix recovers, Barney admits that he read one of the stories from Felix’s notebook and says he needs Felix’s help. Barney leads Felix out of the cellar into the deserted streets and explains they’re in a Jewish ghetto with a curfew. Barney takes Felix to an apartment where a Nazi officer is waiting. Barney—a dentist, whose leather bag contains dentistry tools—instructs Felix to tell the Nazi officer a story to distract from the pain of unanesthetized tooth drilling. Though terrified, Felix tells a funny story while Barney translates it into German. The Nazi officer likes Felix’s story so much that he asks Felix to write it down for him and bring it back to him so he can send it to his children. Barney receives a bag of food as payment.
The next morning, Felix and Zelda look into the street through a crack near the cellar’s ceiling. Zelda, convinced she sees her mother’s shoes, becomes desperate to leave the cellar. Felix realizes he needs to admit her parents are dead. After he tells her, she sobs uncontrollably. The other children tell start telling stories about the Nazis murdering their families. Everyone starts crying. Felix feels fortunate because his parents aren’t dead yet.
Later, Barney asks Felix to help him scavenge necessities. On their way, they overhear Jewish travelers speaking to a Nazi soldier who tells them they’re being taken to the countryside. When Felix asks Barney whether they can go to the countryside, Barney says no. Felix, annoyed, silently resolves to take Zelda and go find his parents in the countryside. Barney leads Felix to an apartment that contains an abandoned dentist’s surgery, where he scavenges syringes and anesthetic. When he tells Felix to find food, Felix enters the kitchen and discovers a murdered toddler. Felix starts screaming and sobbing. When Barney runs to comfort him, Felix asks why the parents didn’t do anything. Barney explains that sometimes parents can’t save their children. He tells Felix that Felix’s parents tried as hard as they could. Confused by the past tense, Felix says he’s going to find his parents in the countryside. Barney explains that “countryside” is a euphemism for Nazi death camps.
That night, Felix is lying miserable in bed when Zelda comes over and asks whether his parents are dead too. When he doesn’t answer, she gives him her silver locket necklace and starts petting his hair. Felix notices her hand is very, very hot. A moment later, she faints. Barney determines that she has a dangerously high fever. Unwilling to leave her while she’s so sick, he sends Felix to find aspirin in one of the ghetto’s abandoned apartments. Felix realizes Zelda may die if her temperature doesn’t come down; he resolves to find her not only aspirin but also a carrot.
Felix eventually finds aspirin and a carrot in an apartment. Then Nazis begin searching the building. Felix runs, falls, and busts open Zelda’s locket. A Nazi grabs him, examines the locket—and leaves him alone. Felix flees. Once he’s reached a deserted street, he examines the locket. Inside is a photograph of Zelda’s mother and Zelda’s father—in a Nazi uniform. Felix resolves to bring Zelda the aspirin and carrot even if her father was a Nazi, reasoning that she’s not to blame for what her father did and she’s basically his family now. When Felix returns to the building where the others are hiding, it’s surrounded by Nazis. He hears the other children screaming and runs to join them.
The Nazis march Barney, Felix carrying Zelda, and the other children to a train station, where more Nazis are forcing Jewish people onto a train. Felix puts the silver locket back on Zelda and shows it to Barney. When Barney realizes that Zelda’s father must have been a Nazi collaborator killed by the Polish resistance, Felix insists they tell someone. They spot the Nazi officer who wanted Felix’s story and flag him down. Barney starts speaking to him in German. The Nazi officer agrees to let Barney and Zelda leave, but when Barney tries to convince him to let the other children go too, he shakes his head. Nazis drags the children toward the train. Barney gives Zelda to the Nazi officer and goes with them. Zelda, struggling, tries to follow the others. After Felix is thrown into a train car, Zelda is thrown on top of him. When he asks what happened, she explains she bit the Nazi officer. Felix hears Nazis nailing the train-car doors shut.
There are no bathrooms on the train. Various passengers eventually go to the bathroom in the corner. When one embarrassed elderly woman starts pushing toward the bathroom corner, Felix decides to tear out all his notebook’s pages so people can use them as toilet paper. He goes toward the corner and grabs a bolt in the wall, planning to impale the pages on it—and the bolt comes away in his hands. Realizing the wooden wall has rotted, passengers create a hole large enough to jump through. Machine-gunners on the train roof kill some jumpers, but others make it to the forest and escape. Felix tries to convince Barney and the other children to jump. Most of the other children are too scared, and Barney insists on staying with them. Zelda and one other girl, Chaya, agree to jump with Felix. Everyone hugs. Then Felix, Zelda, and Chaya jump.
The machine gunners kill Chaya, but Zelda and Felix survive. Felix, having felt syringes in Barney’s coat pocket when they hugged goodbye, realizes he won’t let the other children suffer. He realizes he has no idea how long the rest of his and Zelda’s lives will be, but some good things have happened to them.