Jim watches from an attic window at a town as uniformed men with a lightning bolt insignia bring out Artie, disguised as prisoner Aaron Addison. Artie is brought up to the gallows and Jim removes a special rifle from a hidden compartment. He draws a bead as Artie insists that he is innocent, and the governor’s secretary, a scarred man named Deke Montgomery, asks him to name the man who sent him there. As Artie starts to give the man’s name, Jim fires a shot and Artie collapses. Deke’s men open fire while Jim hides the rifle and discovers that the troops are busting in. He uses a flask of powder to make a circle and burn through the floor so he can drop two floors into a wagon. Jim takes on the three troopers there and runs outside, while Captain Dansby orders his men to shoot the agent on sight.
Jim makes his way through the town and takes refuge in a garden house. A woman is there but takes Jim’s presence in stride. He claims that he’s being chased by a jealous husband and his troopers. The woman says that they’re militia forces, the Black Legion, used by Governor Winston E. Brubaker to control the Indians and maintain law and order. There’s a knock at the door and the woman, Henriette Faure, answers the door. She assures him there’s no need to search the garden house and closes the door, and then offers to show Jim a way out. Henriette triggers a hidden door in the floor and says that is leads to the service door behind the governor’s mansion. When she jokingly considers alerting the militia, Jim kisses her and then thanks her and departs.
Jim makes his way through the underground passageway and finds a guard outside at the other end. Continuing on, Jim sees footprints in the floor and steps on one. A hidden panel opens and Jim finds himself in the governor’s office, with a spinning globe to his left. The panel closes behind him and Deke greets him Jim, commenting on a portrait of Governor Brubaker as a perfect man. As two troopers come in behind Deke, he asks Jim how he got in. Jim claims that he just walked past them without them noticing, and Deke slaps the soldiers and asks Jim why he’s there. The agent says that he’s there to plead clemency for Addison, but Deke says that he’s dead and has been taken to the morgue. Jim asks to give the body a decent burial but Deke tells him that he’s too late and now Captain Dansby will interrogate him. Dansby comes in and has his men try to handcuff Jim. He knocks them out, jumps out the window, and escapes on a convenient horse.
At the morgue, two attendants bring in Artie’s body and put it in a drawer. Jim emerges from another drawer and releases his friend, and gives him a drug to revive him from his deathlike coma. Outside, Catherine Kittridge and two troopers arrive to collect Addison’s body. Meanwhile, Artie wakes up but is woozy and Jim apologies for giving him too much of the drug. The attendant comes in and asks what happened to the body. When he persists, Jim knocks him out and put him in Artie’s drawer. They go out past the troopers, who figure that Artie has been sampling the embalming fluid. However, they hear the attendant yelling for help and let him out, and then give chase.
Jim and Artie escape in a wagon and a squad of Black Legionnaires ride in pursuit. The agents jump off at the next curve and the troopers ride on. As they wait for the men to ride clear, Artie explains that he ended up on the gallows because he thought he was above suspicion. However, the first time he started asking questions, the troopers arrested him for the murder of someone who didn’t exist. Jim asks who the woman at the morgue was, and Artie explains that it’s Catherine, the only one who has dared to stand up to Brubaker. He then takes Jim to somewhere that he says is safe.
Catherine returns to her estate and Captain Dansby insists on searching her residence. She objects and Dansby warns that if she works with enemies of the state, she’ll be treated as one. When he suggests that she might be a little more friendly toward him, Catherine slaps him and goes in. Later, Dansby comes in to search her bedroom. She tosses her knitting in the closet and sees Jim hiding behind the clothing. He winks at her and Catherine remains silent, and then distracts Dansby by apologizing for her slap and offering to be friendlier. She claims she has a headache and asks to discuss it later, and Dansby gives her a brief kiss before leaving. Once he’s gone, Catherine takes out a gun and tells Jim and Artie to come out. They explain that Artie was posing as Aaron Addison and Jim shot him with a drug putting him into a deathlike coma to save him from hanging. When she wonders who they are, Artie tells her that Grant sent them to investigate her father Dan’s charges of corruption and abuse of power against Brubaker. Jim has a warrant against the governor, but Catherine warns him that Brubaker is an absolute dictator of the territory. Dan is rotting in prison in false charges and the agents say that they’ll get him out. However, Grant won’t send an army and set off another civil war. When Catherine sarcastically suggests that they’ll just walk in and serve the warrant, the agents takes her up on her idea.
Jim goes to see Brubaker and serves him with the warrant. Deke has already drawn up a warrant for Jim’s arrest for Addison’s murder and Brubaker has Dansby serve it. When Jim points out that his warrant is a Presidential decree and takes precedent, Deke tears it up. Brubaker goes to his office, chuckling, but nervously pours himself a drink. Henriette assures him that everything will be fine and he desperately hugs her. Meanwhile, Dansby tells Jim that they’ll hold a trial and wonders what Grant’s strategy is after they hang Jim. Dansby is confident that his troops can take on the Seventh Cavalry and orders his men to take Jim away.
The trial begins and Jim’s defense attorney has nothing to say. Jim leaps in and asks for a dismissal, saying that no crime has been committed. He argues that he carried out the sentence of the court and committed a citizen’s execution on a convicted murderer. The prosecutor calls Deke to the stand and, after shaking hands with the jury, testifies that he had found evidence that cleared Addison and was going to deliver it when Jim shot and killed the prisoner. At that point, Artie, back in his Addison disguise, comes in and offers to testify on Jim’s behalf.
The jury returns to give their verdict and the prosecutor Reeves reminds them of their duty to Governor Brubaker and the territory. The foreman then gives their verdict of not guilty, and the desperate prosecutor moves that it be set aside. Deke interrupts and supports the jury’s verdict and the judge frees Jim and slinks off. Reeves makes a hasty exit as well and takes off with everyone else. Jim and Artie spots troopers outside. Artie dons another disguise and they agree to split up. Jim heads for the back and finds Brubaker’s men waiting for him. He disposes of them and makes his escape.
Later, Jim meets up with Catherine as she watches the troopers putting up signs for a Brubaker for President and statehood rally. She’s passed on Jim’s message to Artie to rendezvous at the garden house that night, and explains that her father realized Brubaker’s obsessions years ago but couldn’t convince anyone. Now the governor has the Black Legion and is undefeatable. Two troopers come in and Jim grabs Catherine and kisses her. They leave and Catherine tells Jim that there’s nothing they can do against Brubaker. Jim says that he’ll arrest Brubaker and take him to Washington on the train.
Deke meets with Brubaker and warns that Jim and Artie will try to abduct him. Dansby suggests they might come through the hidden entrance and reveals it using the globe. Brubaker is surprised to learn that Deke and Dansby know about it, and Deke figures that Jim knows about it as well. Deke wants Brubaker to act as bait so that the agent will use the tunnel, which he’s rigged with explosives. Once Dansby and Deke leave, Brubaker closes the secret panel and turns to Henriette for comfort.
That night, Jim and Artie go to the garden house and open the secret door. However, when Jim tells his partner that Henriette showed it to him, Artie warns him that she’s the Brubaker’s secret First Lady. They figure that they’re in a trap just as a steel panel closes, sealing them in. They notice a trigger wire and run for it, just as Dansby has his man set off the charge. The agents get to the far end just in time to escape the blast.
Henriette prepares to leave Brubaker, who wishes that she would marry him. She explains once again that the public prefers him image as a dashing bachelor, and tells him that they can marry once he’s President. Brubaker tries to kiss her but Henriette fends him off, saying she has to go change. She expresses some admiration for Jim, unaware that he’s on the other side of the panel, listening. Once Henriette leaves, the agents come in and capture Brubaker.
The agents take a waiting wagon to the Wanderer
, with Artie sitting with Brubaker. However, when they arrive, Brubaker goes to pieces and explains that he only signed the papers and the others called the shots. Deke arrives and holds them at gunpoint, and explains that due to his facial scarring, the only way he could gain power was to play the role of kingmaker. When Brubaker takes offense, Deke tells him that he’s only a voice and a face and he’s the one who put Brubaker into office and created the Black Legion. Dansby and his troopers arrive and Deke tells them to dispose of the agents while he takes Brubaker to the rally. Once Deke and Brubaker leave, the agents attack and subdue the troopers and ride for town.
At the rally, Catherine hides in the shadows and prepares to shoot Brubaker when he arrives. She see Deke coaching the broken Brubaker, but the governor collapses in the face of his weakness. Deke goes inside and addresses the crowd, while Jim and Artie ride up and see that Brubaker has lost it. Meanwhile, Deke tells the crowd that Grant’s men killed Brubaker. He tries to sway the crowd to his side, insisting that he’s the power, but they walk away from him. Soon, only Jim, Artie, and Catherine are left to watch him rant and rave, and finally collapse, clutching at his scarred face. Deke tells them that it was him all along and Jim agrees.
Later, Dan Kittridge is released from prison. His daughter brings him to the Wanderer
to celebrate with the agents. Jim has a letter from Grant confirming that Dan has been appointed territorial governor pro tem. Catherine talks to Jim privately and asks if he arranged things with Grant, and the agent admits that he made a few suggestions. He also suggested that the governor have a new secretary and kisses Catherine.