Huck, Jim and Tom were trapped in the cabin when the neighbor men who came to catch the gang of cutthroats planning to steal Jim from captivity arrived outside the lean-to. The boys were able to hide under the bed when the men entered the cabin; then the boys escaped into the lean-to connected to the cabin. When the sound of the men's steps indicated they were all away from the cabin, the boys snuck out of the lean-to. They were on their way over the split-rail fence when Tom's pants got caught on a splinter; "he had to pull loose, which snapped the splinter and made a noise." The men started shooting in the direction of the boys, who headed for the river.
Upon reaching Huck's raft and pushing off into the river, the boys were all well pleased with the execution of their plan, "but Tom was the gladdest of all, because he had a bullet in the calf of his leg."
In Tom and Huck's plan to "free" Jim, Tom gets shot in the calf, or leg.