In a small saloon, a man with a banjo begins to sing a song about Lucky Luke, and his recent capture of the Dalton brothers: Joe, William, Jack, and Averell.
After being sent to prison, the brothers receive a surprise visit from an attorney named Augustus Betting. He then explains to them that their Uncle Henry Dalton has been hung. Augustus then informs the Dalton brothers that their Uncle willed them the fortune he accumulated through a lifetime of robberies and hold-ups. However, in order to receive the money, the Dalton brothers must eliminate the judge and jury that sentenced Henry to death. Joe ecstatically wants the names, but is sidelined when the attorney explains that Henry Dalton wanted someone to supervise the executions to be sure they were carried out. Ironically, Henry wishes for Lucky Luke to make sure his last wishes are carried out. The attorney concludes that if the brothers fail to honor Henry's wishes, the fortune will then be donated to charity.
That evening, Joe hatches a plan to tunnel out of the prison. Their path takes them right under the dynamite storage shed, which blows the Daltons as well as a prison hound dog known as Rin-tin-can out of the prison. The guards assume that the Daltons were blown up, along with the dog.
Some distance off, Rin-tin-can comes to, and finding the prison gone, things that it has been stolen. Seeing the Daltons, he follows them, thinking they have stolen the prison.
Eventually, the Daltons come across a traveling hardware merchant, whom they hold up for firearms and ammunition. The hardware merchant goes to the nearest town's bar, where Lucky Luke is. After hearing of the holdup, Luke goes back out to the scene of the crime, where he is accosted by the Daltons. That evening, Joe gives Luke an ultimatum: refuse their offer to help them, he'll be killed. Accept, and they'll give him a share of Henry Dalton's legacy.