Everyone rushes back to the cave, unlock the door and, well, to make a long story short: Injun Joe is found dead at the door. He's clearly struggled to get out. Evidently, he tried to burrow under the door with his knife; he ate candles and bats for sustenance, and even collected water dripping from a stalagmite by using a cup made out of stone, in order to quench his thirst. None of this worked however, and Tom is moved by the sight of his death – he, after all, went through some of the same trauma.
Injun Joe gets buried near the cave, and though there is a movement to give Injun Joe a posthumous pardon for his crimes, it goes nowhere.
After Joe's funeral, Tom and Huck have a very serious conversation. Huck already knows about Tom's ordeal in the cave, so Huck gets him up to speed on the whole Widow Douglas thing.
Once that's all done, Tom drops the real bomb: he knows that the treasure isn't in the tavern…it's in the cave.
So Tom and Huck get provisions for their journey and head back to the hole where Tom and Becky escaped from the cave.
Anyway, Tom tells Huck all about the place – he must have kept its exact location a secret from the adults because he's already decided it would be the perfect hiding place for a gang of thieves. Considering that the cave already was the hiding place of a couple of criminals, he's not so far off…but we already saw what happened to them.
Tom and Huck discuss the specifics of being robbers for a while before finally getting around to searching for the treasure.
In the cave, Tom stumbles upon the piece of useless candle he and Becky left stuck to the cave wall. Soon, however, he comes upon another place, the area that he thought was big chasm in the ground. Well, turns out it wasn't. It's just a kind of hill leading down to the path where Tom saw Injun Joe. It also turns out that there's a cross drawn in smoke on a big rock nearby. Hmm. Sounds familiar, doesn't it?
Huck, rather than being overjoyed, is rather spooked by the whole thing, and would probably be halfway to town if Tom didn't tell him to keep it together.
The boys stumble upon an area in the cave strewn with blankets and old pieces of meat – Joe and his bro weren't exactly living a life of luxury – but there's no treasure chest in sight.
Though they initially dismiss the idea that the box could actually be "under the cross," since the cross is drawn on a rock, they eventually find a strange spot near its base. Tom digs with his knife for a few minutes and – voila – he uncovers a secret passage that had been covered up with boards, a passage big enough for the two boys to fit into. The boys follow it to the end, where they find the treasure chest, along with some guns and stuff.
The put the treasure into individual bags they've brought for the purpose, but leave the other things for future criminal activities.
The boys rush back to town, planning to hide the treasure in the Widow Douglas's woodshed for the time being, but they are intercepted by the Welshman and taken, loot and all, to the widow's house.
When they get there all the village big wigs are there, along with Aunt Polly, Sid, and Mary. Something weird is going on.
Tom and Huck are made to go upstairs, wash, and put on – horror of horrors – suits.