A miscarriage of justice sends Stanley Yelnats to a harsh juvenile detention center. While the warden claims that the hard labor that the boys are subjected to is meant to build character, it becomes clear that she is really using the boys to hunt for a fortune buried by a Wild West outlaw. The outlaw's story and a curse put on Stanley's great-great-grandfather are part of a compelling puzzle that has taken generations to unravel.