The story opens in a Western saloon, where a young musician with a banjo begins to tell a tale of Lucky Luke and his sworn enemies the Dalton brothers: Joe, William, Jack and Averell. Luke has, once again, as he has done many times before, thrown the four outlaws into jail. The prison is also the abode of a guard dog named Rin Tin Can (Rantanplan in the original French language version).
No sooner have the Daltons entered the jail than they are met by a lawyer named Augustus Betting. Betting informs the brothers that their Uncle Henry Dalton has died by hanging. However, over the course of his criminal career, Henry Dalton amassed quite a fortune, and has chosen to leave it all to his nephews on the condition that they kill the judge and jury who sentenced him to death. To make sure that the task is completed, Henry Dalton states in his will that his nephews must be accompanied by the only honest man that he has ever known, Lucky Luke. If the task is not successfully completed, the entire fortune will instead be given to charity.
The brothers then decide to tunnel out of the jail, but end up digging into the dynamite storage building. When Averell lights a match, the building blows up. The Daltons, along with Rin Tin Can, are blown far away from the remains of the jail. Their disappearance along with Rin Tin Can leads the prison officers to believe the Daltons are now dead.
When Rin Tin Can recovers from the explosion, he assumes that the prison was stolen, and upon seeing only the Dalton brothers nearby, suspects them. He then follows them on their journey to find Lucky Luke. The brothers first hold up a travelling hardware merchant. When the merchant stops at the nearest town, Lucky Luke overhears his talk, confirming that the Daltons are indeed alive.
Luke heads out to find the Daltons, who offer to make a deal with him. If he refuses to help them, they will kill him. If he accepts, he gets a share of the inheritance (a ruse by the Daltons, who plan to still kill Luke if he helps them). Luke agrees to help supervise the killings and offers to help kill the judge and jury as well. However, he reveals to his horse, Jolly Jumper, and to the audience, that he was only attempting to deceive the Dalton brothers when he said that.
Luke and the Daltons then cross the plains in search of the judge and jury. However, every time they find one of their intended victims, Luke manages to play some trick on the Daltons so that they believe their target has been killed.
Once they believe their task is done, the Daltons and Luke head off to meet Augustus Betting. However, also waiting for them are the judge and jury they thought had been killed. The Dalton brothers are accused of attempted murder, and with Luke having witnessed their intentions, the jury that had found Henry Dalton guilty, now finds his nephews guilty as well.
The Daltons are returned to the prison, along with Rin Tin Can. Henry Dalton's fortune is then given away to charity.
Lucky Luke — A cowboy who can shoot faster than his own shadow. One of the most respected cowboys on the plains.
Henry Dalton — Deceased uncle to The Dalton Brothers. Amassed a fortune from his life of crime. Was found guilty and hanged for his crimes.
Ming Li Foo — A Chinese laundryman who runs a laundry in Grass City.
Sam Game — A former notorious gambler, who has become a clergyman (although he still uses gambling terms in his sermons). He runs his own church with a congregation, made up entirely of elderly women.
Thadeus Collins — The warden of a jail, whose entire prison population has tunneled out to freedom. Collins thought of his prisoners as his children, and their 'abandonment' leaves him in great anguish.
Bud Bugman — A train driver.
Snake Feather — (Plume de Serpent in the original French language version.) A Native American witch doctor.
Dr. Aldous Smith — A travelling quack doctor who claims to be in possession of a cure-all miracle elixir. The character's appearance is modeled after the actor, W.C. Fields.
Mathias Bones — An undertaker, usually accompanied by a vulture, who is constantly looking out for his next customer. The appearance of this character is modeled on that of the actor, Boris Karloff.
Tom O'Connor — An old miner who supposedly disappeared into his gold mine, and is presumed dead.John Graham - Ming Li Foo
Douglas Lambert - Lucky Luke
Dick Vosburgh - William Dalton
Tony Sibbald - Rin Tin Can
Blain Fairman - Jack Dalton
David Healy - Joe Dalton
Beth Porter - Miss Worthlesspenny
Thick Wilson - Averell Dalton, Bill
Lucille Bliss - Additional Voices (uncredited)
Ron Gans - Mathias Bones, Thadeus Collins (uncredited)
Mel Smith - Additional Voices (uncredited)