Stanley gets taken to Camp Green Lake, and learns what life there is like.
Stanley starts teaching Zero how to read, but ends up getting caught, and forced to stop. Zero then runs away.
Stanley runs away to find Zero, eventually succeeding. they then find shelter on the top of a mountain that has a rock formation that looks like a thumbs-up. On the top of the mountain is water underground that they dig up, and a giant field of onions.
Stanley and Zero go back to Camp Green Lake to find the treasure of Kissin' Kate Barlow, but when they find the suitcase that the treasure is in, The Warden finds them and tries to take the treasure. However, when she tries to take it from them, deadly yellow-spotted lizards are revealed to be living in the hole. The Warden, Mr. Pendanski, and Mr. Sir wait for the lizards to kill the boys so that they can take treasure, however they never do so due to all the onions they ate.
Stanley's lawyer comes by to pick him up, as it had been found thatStanley was not guilty for the crime he had been accused of. The Warden tries to say that Stanley had been attempting to steal her suitcase, Zero reveals that the suitcase has Stanley's name on it, as he is the 4th Stanley Yelnats in his family, and Kissin' Kate Barlow had stolen from Stanley Yelnats the 1st. The Warden, Mr. Sir, and Mr. Pendanski get arrested, and the contents of the suitcase allow Stanley's family to get a new house, and Zero to start a search for his mother. The story ends with a party at Stanley's house celebrating the success of the foot fungus product that Stanley's dad created, Sploosh, and a woman grooming Zero's hair, singing a song her grandmother used to sing to her.