In Austin, Texas, a herd of cows is preparing to leave for Silvercity, New Mexico, under the responsibility of Lucky Luke. On the way to Langtry, Lucky Luke is arrested by Judge Roy Bean, a former bandit converted into a self-proclaimed judge. He is accused of having self-declared stolen the cattle. Sentenced to hanging, Lucky Luke is escaping and decides to assist Bad Ticket, a judge's competitor, in the construction of a new court to destroy each other. Lucky Luke's plan is excellent: Bad Ticket will be tried by Bean and Judge Bean self will judge himself and will bar him from exercising the function of magistrate.