Brent Maverick, the youngest Maverick brother, is being escorted out of town by the sheriff after he wins everything off the town council in poker. The stagecoach arrives and Brent's brother Bart is on-board. Bart explains that he's en route to Abilene to take some money from recently-paid cowboys and invites Brent to accompany him. The two brothers go on their way, playing poker with the other passengers. The stagecoach stops at the town of Sunburst for mail. The local sheriff, Sam Shadley, realizes that there is poker being played inside and demands to know who owns the cards. Bart lets Brent take the blame, and Shadley hauls Brent out and sends the others on their way.
As Shadley takes Brent to the jail, they meet Joanne Moss and her aunt, Nettie. Brent chats with them and Joanne explains that Sunburst is a "pure" town. Town law forbids drinking, dancing, and gambling. Brent wishes them a good day and Shadley tosses him into a jail cell. Later, Shadley brings in another prisoner, Pedro Rubio, and explains that Rubio used a rock to break a window. Once the sheriff leaves, Pedro tells Brent that he has been in the penitentiary for murder the last 20 years. After his release, he deliberately had himself arrested for protection from someone that he refuses to identify.
Later, Shadley brings Brent and Pedro their meals. As he goes, he unlocks the outer door and leaves the cell key on a hook. Pedro finally breaks down and tells Brent that he plans to stay in jail until Thursday, when Circuit Judge Feifer arrives in Sunburst. He explains that when Feifer tries his case, he plans to tell the judge who was responsible for the murder he was convicted of 20 years ago. Feifer is tough but fair, and Pedro believes that the judge will see that justice is done.
That night three masked men easily enter the sheriff's office, grab the cell key, and abduct Pedro. Brent tries to stop them and gets knocked over the head for his efforts. Outside, Pedro breaks away and one of the men guns him down. Brent calls for help from the cell window and the men shoot at him and then run off.
The next morning, Shadley arrives with Mayor Clyde Moss. Shadley has already taken Brent's statement, but Moss demands Brent do everything possible to help identify the killers. Brent admits that he can't identify them and asks who might have wanted Pedro dead. The mayor insists that he's purified Sunburst and that there's no one who could have wanted him dead. Moss then has Shadley release Brent and suggests that he get out of town because some folks suspect Brent was involved with Pedro's murder and might decide to hold a lynching. A disgusted Brent takes his gun and leaves.
While waiting for the stage, Brent takes a hotel room and starts shaving. A visitor comes to see him: Pedro's daughter, Andalucía. She asks Brent for help but he's had enough and just wants to get out of town. She explains that when Pedro returned home from the penitentiary, she was the one who had to tell her father that his wife had died two years ago in abject poverty. Brent insists that he can't help but Andalucía says that no one else will help her because of Pedro's alleged crime. She thought Brent would be different and accuses him of cowardice. He reluctantly gives in and says that he'll stay in town for just 24 hours to figure out who was responsible.
As he leaves the hotel, Brent runs into Joanne and Nettie. They talk about the town history paper that they're preparing and ask him what happened in the jail. Brent suggests they all see Shadley and the women eagerly agree. Shadley isn't thrilled to have Brent back and takes offense when Brent accuses him of having left the cell keys in plain sight. At first, Shadley denies doing so but when Brent asks to see the keys the sheriff attacks him. Brent easily subdues him and sends the ladies away, then threatens to tell everything to Feifer when he arrives if Shadley doesn't come clean. Shadley tries and fails to pay off Brent with $5,000 and then warns that they're both dead if they find the three men. Brent refuses to back off and Shadley tells him to hole up at the hotel until they can meet that night.
Moss is meeting with the town clerk, Robbins, when local ranchers Taylor and McGuire arrive to meet with him. The mayor quickly dismisses Robbins and asks for a report. They confirm that Brent didn't leave on the stage and is writing a letter to give to Judge Feifer when he arrives. Moss tells them to get the letter from Brent and then dispose of him. Joanne bursts in and tells her uncle that she and Nettie have learned from Brent that Shadley helped the three men abduct Pedro. Moss insists that Shadley is trustworthy but Joanne refuses to drop the matter. Once she leaves, Moss tells the two ranchers to lure Shadley to the town hall, dispose of him and Brent, and get the letter.
That night, Brent goes to the hotel lobby and leaves Feifer's letter with the hotel clerk. Once Brent leaves, McGuire forces the clerk to hand over the letter. Meanwhile, in Abilene, Bart tries to leave a poker game in order to go help Brent in Sunburst. However, the other players refuse to let him leave before they have a chance to win their money back.
Shadley goes to the town hall to meet with Brent and Taylor shoots him dead. Brent hears the shot and opens fire, wounding Taylor who is hiding in the shadows. Taylor slips away and Brent runs to Shadley unaware that McGuire is preparing to shoot him. However, Joanne comes out of the town hall and Brent realizes that they're both in danger. He grabs her and runs to a nearby stable for protection. Joanne assumes the worst, figuring that Brent was working with Shadley to murder Pedro and then killed Shadley to eliminate any witnesses. Brent points out that if that was true he would've already killed her. He offers her his revolver as a sign of good faith. Convinced, Joanne still holds him at gunpoint until Brent points out that he unloaded the revolver before he gave it to her. She suggests that they go to her uncle and tell him everything they know and Brent agrees.
McGuire and the wounded Taylor, busy explaining the shootout to Moss, quickly hide when Brent and Joanne arrive to report what they know. Moss, acting duly shocked, is careful to confirm that Shadley didn't tell Brent anything incriminating. Once he's satisfied that they don't know who the real murderer was, Moss asks Brent to stay in his hotel room until Feifer arrives to sort out the whole mess. Brent agrees and Joanne leaves with him. Outside, they flirt and Brent finally tries to kiss her. Joanne hesitates, explaining that due to Sunburst's restrictive laws, she doesn't know how to kiss a man. Brent is glad to demonstrate but Nettie comes out and interrupts them. She explains that she found an old will in the attic and wants Joanne to read it. Brent bids them goodnight and goes back to his hotel. Meanwhile, Bart, finally taking his fellow poker enthusiasts for everything they have, departs for Sunburst.
At the hotel, the clerk gives Brent a note from Andalucía. It asks Brent to come to her farm so she can tell him who the killer was. Brent rides out and Taylor and McGuire fire at him when he arrives. Brent gets into the house as Andalucía wakes up, suspecting that she laid a trap for him. However Brent believes her when she denies it - especially when a stray shot shatters a lamp, setting fire to the house. Knowing that they have to escape before they're burned to death, Andalucía shows Brent a trapdoor leading to an old tunnel used during Indian raids. They climb down and go outside. McGuire and Taylor gladly assume that they died in the fire.
At the end of the tunnel, Andalucía admits that she tore her nightgown saying that town law forbids her from going around in half a nightdress. Brent goes after McGuire and Taylor, only to discover that they've already left. He grabs some clothing from a line and takes them to Andalucía, who says that she saw Taylor but not the other shooter. She explains that Taylor is the richest rancher in the area and tells Brent where he lives. Once she changes, Brent tells her to ride into town and have Moss swear in some deputies to ride out to Taylor's ranch and arrest him.
Brent then rides off to Taylor's ranch himself. Hearing him in the stable, calming a nervous horse, Brent captures Taylor at gunpoint. Meanwhile in town, Andalucía tells Moss and McGuire what happened. Once they confirm that she didn't see the second shooter they subdue and tie her up. Not knowing the mayor is in on it, Brent tells Taylor that Moss and the deputies are on their way and asks for a confession.
Knowing that his partner is on the way, Taylor explains that he and Pedro witnessed rancher Briton Martin murder a man. Martin offered them both a fortune to remain silent - on the condition that Pedro took the blame. The rancher promised Pedro that he wouldn't hang, and that his money would be waiting for him in 20 years. Taylor claims that Martin also promised to take care of Andalucía and her mother and that Pedro took the deal rather than continuing to live in poverty. However, Martin died of a heart attack after he protected Pedro from hanging - but before he could take care of Pedro's family. Brent demands to know who the other two men at the jail were but Taylor refuses to identify them.
Moss and McGuire arrive and easily capture the unsuspecting Brent. They bring Andalucía in and prepare to put her in Sultan's stable to be trampled, making it appear to be an accident. They figure to dispose of Brent up in the mountains. Taylor tries to lift Andalucía over the stable wall but is interrupted when Joanne and Nettie arrive. They now know everything, thanks to Nettie. She found Martin's diary which explained the whole situation. Moss admited that he took a share of Taylor's payment, but insisted that he helped the town by making it pure. Joanne accuses him of hypocrisy and of turning the town into a place for stuffed shirts. Taylor, perched on the stable wall, goes for his gun but Bart arrives just in time and he and Brent both shoot the rancher. Taylor falls into the stable and is stomped to death by his own horse.
The next day, Brent boards the stage out of Sunburst but Bart plans to stay in town and provide the newly freed townspeople with a few profitable lessons in poker. Joanne is also leaving town, as is Andalucía with the money that she collected from Martin's payment. Nettie decides to leave town as well now that her husband's in jail. As the stagecoach leaves Sunburst, Nettie produces a deck of cards and suggests that they play a little poker.