Chapter 23 begins with a flashback: Green Lake, 110 years ago, before the lake dried up into a desert. There is a quaint, thriving town near the beautiful, lush lake, where the equally beautiful school teacher is wooed by a lot of the men in town. Trout Walker, the son of the richest man in town, wants to marry Katherine Barlow, and attends her classes so he can catch her attention. She rejects him, however, when he asks her to go on a date with him.
In Chapter 24, there is a scuffle in the food hall when one of the boys asks Mr. Sir about his face - still swollen and bruised from his encounter with the Warden's poisonous nail polish - and Mr. Sir grabs the boy and throws him to the ground. Later, Mr. Sir takes revenge on Stanley by refusing to fill up Stanley's canteen when the boys are out digging.
The flashback picks up again in Chapter 25, in which we are introduced to Sam, the onion man: a kind and caring young man who lives in Green Lake and sells onion-based remedies to the townsfolk for a variety of afflictions. A friendship develops between Katherine Barlow and Sam as he fixes the roof of the school house in return for some of her signature spiced peaches, and then goes on to fix the windows, door, and so on. They discuss poetry and talk about their lives, and Kate falls in love. One night, Sam sees Kate crying - she is sad that there is nothing left to be fixed in the schoolhouse and she won't have an excuse to talk to him any more. He kisses her. A local busybody sees the kiss and is outraged: it is against the law for a black man to kiss a white woman.
The next day, everyone in town knows that Kate and Sam kissed. None of the parents let their children go to school, and an angry mob shows up at the school house, prepared to burn all the books. Katherine escapes and runs to the local sheriff, who is drunk. He refuses to do anything about the mob, and asks Kate to kiss him. She slaps him and runs to find Sam, warning him that they have to leave immediately.
They escape onto the lake in Sam's boat, but Trout Walker catches up to them in his own, motorized boat. He shoots Sam and rescues Katherine. Three days later, Katherine shoots the sheriff and kisses him with a mouth full of lipstick. She then goes on to become a notorious outlaw.
At Camp Green Lake, Stanley is having trouble with Mr. Sir, who still refuses to fill his canteen, and with the other boys, who resent the fact that Zero is digging part of Stanley's hole in exchange for Stanley teaching him how to read. Stanley learns that Zero's real name isn't actually Zero, but rather Hector Zeroni.
Twenty years after Sam was killed and Kate began her career as an outlaw, she returns to Green Lake, by now a ghost town on a lake that is mostly dried up. Kate lives in the cabin for three months, comforting herself in her madness with memories of Sam, until Trout Walker and his young wife wake her up at gunpoint and demand to know where she has hidden her loot. Kate refuses to tell them, saying that their children's children can keep digging for a hundred years and never find it. Trout and his wife try to make her take them to the treasure, but Kate is bitten by a yellow-spotted lizard. She tells them to "[s]tart digging," and dies laughing (123).
Chapter 23 seems to come out of nowhere - the reader might well wonder about the purpose of presenting a description of Green Lake more than a hundred years ago, especially since it bears little resemblance to the modern-day wasteland. Louis Sachar, however, makes sure to tie this chapter back to the present in subtle ways, and also foreshadow future events in the main narrative of the novel. In a rather comic passage, the narrator describes Charles "Trout" Walker's foot fungus, which made his feet smell "like a couple of dead fish" (102). The narrator goes on to tell us that it was the same foot fungus that Clyde Livingston - the athlete whose shoes Stanley is accused of stealing - suffers from. This casual detail serves to link the past and the present, and remind us that nothing is ever totally past: human history repeats itself.
In terms of foreshadowing, in Chapter 23, the narrator mentions Katherine Barlow's sweet spiced peaches, and notes that they "probably would have lasted a lot longer" than a couple of months, but "they were always eaten by the end of winter" (102). The reader surely will not appreciate the importance of this detail when they first read Chapter 23, but the long life of the jarred peaches ends up helping to save Zero and Stanley's life when they are stranded in the desert, and come across a much-needed stash of what Zero calls "Sploosh." Of course, the mention of both the peaches and the foot fungus which causes the stench of Trout Walker's feet in the same chapter is clever in hindsight, given that peaches are one of the key ingredients in Stanley's father's odor-removing invention.
Sam, the black man with whom Katherine Barlow falls in love, is kind and well-liked, even though he tells stories that are slightly unbelievable, and people aren't willing to rely fully on his homemade onion remedies. He is also very intelligent. Kate Barlow is a smart woman, and she falls in love with Sam partly because he is caring, and partly because he is smart, and can recite Poe and Longfellow poems by memory. This "interest in poetry" surprises her, which perhaps lends itself to a parallel with the modern-day narrative. Zero is judged by everyone at camp in the same way Sam is judged by many townspeople because of his race, and yet is very intelligent and quick to learn, which surprises Stanley and leads to a close friendship developing between them. Zero, like Sam, is also very good with his hands. While Sam impresses Kate Barlow by fixing up the schoolhouse, Zero is the quickest digger at Camp Green Lake.
The account of Sam's death is told in a strikingly different tone from the rest of the novel. The narrator makes himself present, seeming to take on the role of a lawyer. He writes, "These are the facts:" and goes on to list, in short, syntactically simple sentences, the sequence of events (115). There is an interesting choice here, since Sachar chooses to write in the passive rather than the active voice. He writes that "Sam was shot" and "Katherine Barlow was rescued," rather than telling us who shot and rescued the pair (115). This underscores the brutality of the scene by shifting the focus onto the victims rather than the villains. The next facts that the narrator provides are that these events happened 110 years ago, and that "not one drop of rain" has fallen in the area since then. The presentation of this fact in the context of the others seems to suggest a link between Sam's death and the century-long drought, even though this is quite an incredible and fantastical statement. The narrator-lawyer then asks us, as if we are the jury, "You make the decision: Whom did God punish?" (115). This question picks up on the thread of curses that the townspeople have been uttering against Kate and Sam, saying that God will punish them. The answer is clear: God punished the townspeople and the descendants of the men - especially Trout Walker - who persecuted Sam and Kate, by making the lake dry up and depriving them of their fortune and, as we will find out, their sanity.
Part One of the novel (Chapter 28) ends with a death and a curse. Kate Barlow is bitten by a yellow-spotted lizard, and there are distinct echoes of the beginning of the novel when the narrator writes, "There was nothing they could do to her anymore" (123). The last sentence of Chapter 1 is very similar, as the narrator tells the reader that if they are bitten by one of the lizards, "There is nothing anyone can do to you anymore" (4). The first chapter and the first part of this novel both end with an image of death as a release from pressure, authority, and perhaps even a curse. Before she dies from the lizard bite, Kate Barlow tells Trout Walker and his wife that "you're going to be digging for a long time... You, and your children, and their children, can dig for the next hundred years and you'll never find it" (122). It almost seems as though the treasure is linked with the drought - the treasure is buried and cannot be found, and no rain ever comes to Green Lake. At the end of the novel, Stanley and Zero find the loot, and it begins raining almost immediately. A physical sign signals the curse on Green Lake is broken, and Kate Barlow is fully avenged on Trout and his descendants.