Stanley has already been arrested when we first meet him, but the story really begins before his arrest. Stanley is overweight, isolated, and unhappy. His parents are loving and kind, but he has no friends and he is regularly bullied at school. His father's inventions have been consistent failures, and the family is desperately poor. The situation is pretty sad, but at least it can't really get any worse… right?
Okay, so maybe it can get worse. In addition to being poor and unhappy, Stanley is now a convicted felon. Stanley's parents, hoping for the best, choose to have him sent to Camp Green Lake instead of to jail. Unfortunately, as Stanley soon discovers, Camp Green Lake is a hot, miserable place run by a borderline crazy woman interested only in extracting free labor from the boys she's supposed to be helping. Luckily, though, Stanley does what he's always done: he keeps his head down, doesn't make waves, and adapts to the realities of his new situation. He even begins to make a friend. He may still be unhappy, but at least things are on an even keel again.
Just when Stanley has worked out how he's going to survive his time at Camp Green Lake, everything changes. His new friend Zero, deciding he just can't take it anymore, runs off into the desert with nothing but a shovel to keep him company. As he waits (along with the rest of the camp) for Zero to give up and come back, Stanley finds himself tormented by guilt and worry about what his friend might be going through. Ugh.
In an uncharacteristic display of initiative, Stanley makes a desperate attempt to help his friend. This is a defining moment for Stanley: a departure both literally and figuratively. His compassion for Zero encourages him to risk the (admittedly not-so-awesome) balance he's managed to achieve at Camp Green Lake. Whatever happens from here on out, things will never be the same for Stanley Yelnats.
After a fateful trip up a mountain and back, Zero and Stanley head back to camp and find what seems to be a pretty major treasure. Our hearts leap, only to plunge way back down when the boys are captured by the Warden and realize they are in the heart of a yellow-spotted lizard nest. Yikes. How are they going to get out of this one?
When the tension is at its highest, the book manages to ease us into a resolution. With the help of Stanley's new lawyer Ms. Morengo, the Texas Attorney General, and the sunlight that chases the yellow-spotted lizards away, Stanley and Zero find themselves still alive (phew) and released from Camp Green Lake. Stanley's father has invented a promising new product, Stanley has custody of the treasure suitcase, and it even starts to rain. We don't know exactly how everything's going to turn out yet, but things sure are looking up.
In the book's final chapter, the narrator ties up a lot of loose ends and sets the reader's mind to rest. We find out that bad things have happened to the bad characters and good things have happened to the good characters – all is as it should be. The narrator does remind us gently that not all the suffering endured can be wiped away and forgotten quite so easily as we might wish (see our "What's Up With the Ending?" section for more details), but all in all this is everything we could hope for in a conclusion.