In the middle of the desert, a bunch of boys are digging holes in the sand under the scorching
sun. Suddenly a rattlesnake appears nearby and a boy that can’t take the work anymore decides
to take off his shoes to touch the snake, meeting his end. Meanwhile in the city, Stanley Yelnats
The Fourth is walking by when suddenly a pair of shoes falls on his head, knocking him down.
Since his dad is working on a cure for stinky feet, Stanley decides to bring the shoes home,
but at that moment the police surround him. Those shoes belong to a famous baseball player and were
stolen from a charity event, so now the cops think Stanley did it. The police take him to
see his parents and immediately notice suspicious things: his dad Stanley The Third has an apartment
filled with dozens of shoes, and Stanley the Fourth has posters of the baseball star on his
wall. Considering this proof, Stanley is taken to court, where he’s offered two options: jail,
or spending eighteen months in Camp Green Lake. Stanley obviously chooses the camp,
and during the trip, he can’t help wondering if this incident is part of the family curse.
The bus crosses a vast desert full of holes, and for a second Stanley thinks he can see
a merchant with his mule, but it seems it’s just his imagination. He arrives at a small shady town,
which is filled with boys wearing prison uniforms. Stanley meets the warden’s right hand Mister Sir,
who finds Stanley’s name funny. The boy explains the family surname “Yelnats” is Stanley backward
and naming the sons Stanley became a tradition to keep the pun, but Mister Sir doesn’t care
and proceeds to share how things work here. The camp doesn’t have watch towers or fences because
there’s nothing but desert for hundreds of miles without a single source of water,
so nobody dares to escape. Stanley is given only two sets of clothing and a shovel, which will be
used to make holes. Every day Stanley must dig one hole 5-foot deep and measure it with the shovel.
The longer it takes him to dig, the longer he’ll stay out in the sun. He also has to be careful
to avoid rattlesnakes and yellow-spotted lizards, because they can kill him. Next Stanley meets the
camp’s counselor Doctor Pendanski, who shows him around and tells him the number one rule is not
to bother the warden. Pendanski makes the other boys take Stanley to the place where he’ll sleep,
which has vomit stains from the dead child. The doctor calls the guys by their real names,
but they only refer to each other by using the nicknames they’ve acquired here. The youngest
boy is Zero, who gets called that because he never talks. Afterward, Stanley asks where he can fill
his canteen, but when he uses a boy’s real name, the guy pushes him around to remind him to use the
nicknames. Then Stanley grabs dinner, which is just beans made in different ways. X-ray steals
some of his food, claiming he deserves it more because Stanley hasn’t dug today. The boys ask
Stanley why he was sent here, and when he answers he stole famous shoes, Zero shocks everyone by
asking him if they had stars on them. As Stanley confirms it, he remembers part of the trial,
during which the baseball star explained he grew up in an orphanage and that’s why he donated to
charity, calling Stanley a fake fan. Late in the evening, Stanley can’t sleep and remembers
that his grandfather claims the family is cursed, that’s why Stanley the Third never is successful
with his inventions. Even Stanley the First was unlucky, he made a fortune in the stock market
but was killed by an infamous criminal known as Kissing Kate. She got that nickname because she
would kiss her victims after killing them, leaving bright lipstick on their faces. However she didn’t
kiss Stanley, she just took his treasure chest and left him stranded in the desert. The next morning,
the boys are woken up when it’s still dark to start working. Everyone gets a tortilla for
breakfast and a shovel, but when Stanley grabs one, X-ray pushes him and takes it from him. It
turns out X-ray’s shovel is shorter and doesn’t let anyone else use it. When they arrive at the
digging spot, Mister Sir explains to Stanley that if he finds anything interesting while digging,
then he must report it, and if the warden likes it then he gets the day off. However Mister Sir
claims that they aren’t digging for anything in particular, it’s only to build character. All the
boys get to work and when they throw the dirt, sometimes it falls into another hole. Stanley
tries to ask them to be careful, but the boys just laugh at him While Stanley works on his hole,
he thinks about the curse again. His ancestor Elya worked in a pig farm and fell in love with
the boss’ daughter Myra. He visited the local fortune teller Madame Zeroni to learn how to win
the girl's heart, but Zeroni told him to forget about the girl and travel to America to meet his
fate. Elya didn’t give up and asked his boss for Myra’s hand, however there was another candidate
offering a huge pig as dowry and Elya was turned down. He returned to Zeroni, who finally took pity
on him and taught him a trick. Elya had to take a small piglet up the mountain every day to drink
from the stream while Elya sang a tune for it. Elya would grow stronger and the pig would grow
larger until it could be used as the best dowry. After handing in the pig, he had to come back and
carry Zeroni up the mountain so she could drink too. If he failed to do that, a curse would fall
on him and all his descendants. Stanley followed every step for a few days until the pig was huge,
so he took it to his boss. However both pigs were the same size and the boss let Myra choose
who to marry. Myra couldn’t make up her mind and offered a guessing game to decide, but Stanley
was so offended by her flippant attitude that he decided to go to America like Zeroni first told
him. Unfortunately he forgot to take Zeroni to the mountain before leaving, so she cursed the
family as promised. Back to the present, Mister Sir stops by the holes with his trucks so the
boys can fill the canteens with water and teases Stanley for getting his first blisters on his
hands. The first one to finish working is Zero, who is a very fast digger and the boys think he
eats the sand. When Stanley finally finishes his hole, nobody helps him get out of it, so he has
to learn to climb out alone. Once he’s back in town, he finds Mister Sir pointing a gun at him,
but actually he’s shooting a yellow-spotter lizard. The shot misses and the lizard jumps out
to attack Stanley, but Mister Sir shoots again and the little lizard dies. Days start to pass
and Stanley starts getting used to the camp’s routine. He wakes up early, eats nasty beans,
then spends the day digging, which causes more blisters on his hands. There often are dangerous
animals around, and sometimes the shower doesn’t even work. The other boys also keep bothering him,
making fun of him for being a softie. Stanley lays low to avoid trouble and when he writes to his
mom, he lies and says he’s having a wonderful time in a normal summer camp. One afternoon,
Stanley discovers a fossil and brings it to Pendanski, however the doctor informs him the
warden doesn’t care about fossils. He also shares that there used to be a lake in this area and that
the land surrounding it belonged to the warden's grandfather. This triggers a flashback showing
how the town used to be lively and thriving. A merchant called Sam often came with his cart
pulled by his mule to sell wonderful onions, which he claimed could cure all diseases and keep deadly
lizards away. Sam had a crush on the local teacher Katherine and always brought a sack of onions just
for her, so she would give a jar of peaches she gathered in exchange. All the men in town liked
Katherine and disliked the attention Sam would get from her. One rainy day, Katherine had to send the
kids home because of the leaks on the school roof, so Sam volunteered to fix them. This allowed him
to spend more time and bond with her, so he started to fix other parts of the school too.
However he also had to watch how the evening adult class kept throwing inappropriate comments at her.
The Warden’s grandfather Walker actually asked her out, but she turned him down, leaving him furious.
Eventually the school became the most beautiful building in town, but Sam lost his mule, so he
got a boat instead. One rainy afternoon, Sam and Katherin finally gathered enough courage to kiss,
unaware they were seen by Walker who immediately spread the news around town. In just a few hours,
the townsmen came together and burned down the school as punishment. Katherine rushed to ask
the sheriff for help, but he was drunk and asked her for a kiss. As Katherine pushed him away, the
sheriff mocked her and called Sam slurs, reminding her that interracial relationships are illegal and
Sam would be executed. Horrified, Katherine ran to warn Sam but it was too late: the townsmen
shot him while he was on his boat. Sometime later, Katherine came back and shot the sheriff before
giving him the kiss he wanted. Then she left town and became the outlaw known as Kissing Kate. Back
to the present, X-Ray approaches Stanley and tells him that the next time he finds anything,
he should bring it to him. Later in town, Stanley accidentally falls on one of his tormentors and
almost gets in a fight. The boys immediately calm them down, but now Stanley has earned their
respect. He is nicknamed “Caveman” and even gets a better spot in the water line. Sometime later,
Stanley gets a letter from his mother, telling him his father’s experiment keeps failing and that the
landlord may kick them out soon. Zero notices Stanley is ready and admits he never learned,
so he asks Stanley to teach him. However Stanley refuses, saying he isn’t a good teacher and
that he’s too tired at the end of the day so he needs his rest. During another digging session,
Stanley is surprised to discover a little object with the initials “K. B.”. The boys wonder if it’s
a shotgun shell, but it seems to be too thin. X-ray takes the object, ignoring Stanley trying
to stand up for himself. As soon as Pendanski sees it, he contacts the boss, who immediately
comes over and the boys are shocked to discover the Warden is a beautiful woman. She’s very
pleased with this discovery, so she tells X-ray to take the day off and instructs the others to
completely excavate the area around X-ray’s hole. That afternoon the boys work much more than usual,
but they don’t find anything because it's the wrong spot. For the next few days, the boys
have to keep on digging in the same tunnel they’ve created, yet the only thing they find is a small
dial. Soon the Warden gives up and the boys go back to digging individual holes. The next day
while Mister Sir is filling their canteens, one of the boys steals a bag of sunflower seeds from the
truck. After Sir leaves, the boys begin sharing them, but unfortunately Mister Sir quickly notices
the bag is missing and turns the truck around. The boys rush to hide the seeds and they accidentally
spill at Stanley’s feet, so he does his best to cover them with sand. When Mister Sir returns,
he still sees the seeds, so Stanley covers for his friend and says he did it, shocking everyone.
Then Mister Sir brings Stanley to see the Warden for punishment. Inside her office, there are lots
of posters about Kissing Kate and the Warden proceeds to show her special nail polish that
she makes with rattlesnake venom. After quickly painting her nails, the Warden slaps Mister Sir
for interrupting Stanley’s digging over something stupid like seeds, then she sends Stanley back to
digging. When he returns to the digging area, the guys see him as a hero and Zero has finished his
hole. As thanks, Stanley agrees to teach Zero how to read. The next time they see Mister Sir, he has
two horrible scars left by the nails, and he’s so angry with Stanley that he doesn’t fill his
canteen. As Stanley remembers what he saw in the office, he thinks that the little tube he found
was Kissing Kate’s lipstick. Another flashback shows that Kate only killed the people who were
involved in Sam’s death and the destruction of the school. However she did steal a lot,
and after taking the treasure chest from Stanley the First, she buried it where the lake used to
be. While she was resting, she was found by Walker and his wife, who were desperate for money because
the town went to ruins after the lake dried on the day of Sam’s death. Instead of killing them, Kate
decided on a sweeter revenge: she let a lizard bite her and took the location of the chest to her
grave, that way William and all his descendants like the Warden would be digging forever in such
a big desert. Back to the present, Stanley begins teaching Zero how to read and write. Zero reveals
his real name is Hector Zeroni, meaning he’s a descendant of Madame Zeroni. Since Zero is
such a fast digger, he starts helping Stanley with his holes, which makes the other boys envious. One
afternoon, Zero shares the story of his mother, who worked hard to provide for him but one day
she disappeared. Since then Zero has been living on the streets. Sometime later, one of the mean
boys continues to give Stanley a hard time for having help in the hole. Stanley confronts him
and Pendanski encourages them to fight to solve their problem. As the boys struggle on the ground,
Stanley gets easily overpowered, so Zero jumps in to help and almost kills the other guy. Pendanski
shoots in the air to make them stop, and soon the Warden comes by to hear what happened. The
boys tell her that Zero is helping Stanley, so he immediately clarifies that he’s teaching Zero to
read in return. However the Warden is furious, and Pendanski continuously makes fun of Zero
as he calls him dumb. Zero finally snaps and hits Pendanski with a shovel before running away in the
desert. Mister Sir wants to go after him, but the Warden tells him not to. Zero had nobody, so they
could just delete his files and pretend he was never here. In the evening, the boys discuss how
Zero will die in the desert. Stanley can’t stop worrying and thinks about the story of Stanley the
First surviving sixteen days in the desert after Kate robbed him. Apparently he found refuge in
some place called “God’s thumb”, but nobody knows what it is and Stanley the First couldn’t tell
because he was half-crazy when they found him. The next day, a new kid arrives to replace Zero, which
bothers Stanley. He makes a plan and when Mister Sir comes to fill their canteens, Stanley steals
the truck. Mister Sir immediately goes after him and holds onto the door, so Stanley tries to push
him away and gets distracted, causing the truck to fall into a hole. Refusing to give up, Stanley
leaves the vehicle and runs into the desert as the other boys cheer him on. When the Warden hears
about it, she orders Mister Sir to report Stanley is missing in two weeks because by then there
won’t be anything to find. Under the scorching sun, Stanley continues walking and ignoring all
the poisonous lizards in the area. Eventually he finds Sam’s boat and Zero is underneath,
tired but alive. He’s been surviving by eating the peaches Kate had given Sam all those years ago,
which became jam in the jars. After Stanley also eats some, he notices a mountain in the distance
that looks like a thumb and realizes that’s where his ancestor survived. The duo leaves the
boat and starts climbing the mountain, which is quite an effort. Stanley slips and almost falls,
but Zero quickly reaches with his shovel to help him up. Unfortunately this causes Zero’s
hands to get hurt, so Stanley wraps them up the best he can. The boys keep going for a while,
but soon Zero grows weak and falls. Stanley catches him before he rolls away, however Zero
is too exhausted and passes out. Refusing to give up, Stanley picks his friend up and carries him
all the way to the top of the mountain, just like his ancestor had taken the pig. Eventually Stanley
sees some green and discovers a small stream with water and Sam's delicious onions. He immediately
wakes Zero up and both boys eat and drink to recover. Stanley also sings a song that his family
likes, not knowing it's the pig’s song passed through generations. Now Madame Zeroni’s soul
can rest in peace. As the curse is lifted from the family, Stanley the Third finally finishes
his invention and discovers an effective treatment for the foot odor by blending peaches and onions,
so the family celebrates. The next morning, Zero makes a huge confession: he was the one who stole
the shoes. He had seen the shoes as a donation for the shelter he was in and just took them,
not knowing they were famous. However the police soon went after him, so he took them
off and threw them over the bridge, accidentally landing on Stanley. Zero ended up getting caught
while stealing shoes from Payless the next day. Stanley isn’t mad though, in fact he sees this
as destiny and is glad it happened. Meanwhile Stanley's lawyer arrives at the camp to pick him
up because it’s been decided he’s innocent. The Warden kicks her out, but the lawyer promises to
come back with reinforcements. Back to Stanley and Zero, once they’re feeling better they return to
the digging area and find the hole where Stanley found the lipstick. After lots of digging, they’re
excited to finally find the famous chest. At that moment the Warden and Mister Sir find them,
however a bunch of lizards come out and cover both the boys and the chest to protect them. The Warden
decides to wait for the lizards to kill the guys and shares a story of how her grandfather used
to make her dig even on Christmas. Morning comes and the lizards still haven’t moved or bitten the
kids. The wait is suddenly interrupted by the lawyer, who has arrived with a few cops. The
Warden invents a story about the boys stealing the chest from her office and running away with it,
but Zero proves they’re innocent by pointing at Stanley’s name on it. Afterward they return
to town and the lawyer puts the chest in her car before announcing they’re leaving. However Stanley
refuses to leave without Zero, so the lawyer asks for his file. When they discover the file
is missing, the cop makes a call to get permission for an investigation and learns that Mister Sir is
a criminal on the run and Pendanski isn’t really a doctor, so both men and the Warden get arrested.
At that moment, it rains for the first time in decades and the boys come out to celebrate. A few
days later Stanley and Zero open the chest with the family and find lots of treasure, including
shares for A.T.&.T. Stanley wants to share the treasure with Zero and the family agrees,
so the first thing Zero does with the money is hire private investigators to find his mother,
which results in a very emotional reunion. Sometime later, the camp is closed and the boys
are sent to real counseling. Stanley’s and Zero’s families become neighbors in a fancy neighborhood,
and their friends from camp visit them often. Stanley’s invention becomes a huge success and the
famous baseball star now works on his ads, proving it was all connected since the very beginning.