Matt, Thad, and Festus chase down and capture an escaped murderer named Billy Bowles. They are supposed to take him to Hays for hanging but when they arrive in Dodge, Matt finds out that the hanging is to be conducted in Dodge.
As they're escorting Bowles into the jail, a man named Preston attempts to shoot the outlaw. When Matt questions him, Preston says that Bowles killed his wife. Matt orders Festus to send Preston back to Hays.
The next visitor to the jail is a woman claiming to be Bowles' wife. Matt doesn't know she's part of a conspiracy to kill Bowles before he can reveal his accomplices. She fools Bowles by pretending they're going to break him out of the jail.
Matt then needs to find someone to actually perform the hanging since no one in the town wants to be responsible for it. A Mexican with a family to feed comes forward, asks for the job, and gets it. When the Mexican returns to his family's camp and tells his wife what he will be doing, she pleads with him to return the money and quit the job. He refuses to do so at first.
Festus and Thad agree to build the gallows for Matt. They go looking through storage for the old scaffold pieces, which they find and assemble.
The night before the hanging, the woman pretending to be Bowles' wife goes over to the jail to visit him. A member of the gang has hidden himself in the rooftops across from the cell and attempts to kill him. The gang revises their plans to a rescue because Bowles has threatened to write their names down in his 'will', which he will put in his pocket to be retrieved after he is hanged.
As the marshal and his deputies take Bowles to the hanging scaffold, they are ambushed by members of Bowles' gang. Thad is injured, Festus comes to the rescue, and Preston shoots Bowles on the scaffold as he is attempting to strangle the hangman. Matt retrieves the 'will' from Bowles' supposed widow. Festus takes her and Preston to jail.