Evening in an American miners' camp. Nick, the barkeeper, opens the bar, the workers return from the mines and wait for Minnie, who runs the bar and is also the only woman in the camp. They pass the time playing cards and brawling. To distract them, Nick has a song from their distant home played. Larkens is overcome by homesickness, and his friends collect money to pay for his journey home.
The self-appointed sheriff Jack Rance, who is after Minnie, brags in front of the assembled company that Minnie will soon be his wife. He gets into a fight with Sonora, who is also madly in love with Minnie. In the middle of the fight, Minnie enters and puts them all in their place. She not only runs the inn but also tries to give the rough men some schooling in winter, and she makes them stop and think with a Bible lesson. Ashby, an agent for a transport company, visits the camp. He is on the trail of a bandit called Ramerrez, who has been making the region unsafe for some time. The post arrives; a message from a dubious woman provides Ashby with information about the supposed whereabouts of Ramerrez.
Jack promises Minnie a thousand dollars for a kiss and tries to win her love with money. She abruptly rejects his advances and tells him of the poor but happy life and love of her parents. A stranger arrives at the heavily-guarded camp; Jack becomes suspicious and calls the workers together, inciting them against the stranger. However, Minnie vouches for the stranger, who has introduced himself as Mister Johnson from Sacramento. Minnie remembers him from a previous encounter. A waltz begins, and the stranger is accepted into the community. An alarm sounds, and the workers drag in Castro, a member of Ramerrez's band. He has come to lure the workers out of the camp with erroneous information about Ramerrez's hiding place, giving his leader (for the stranger Dick Johnson is in fact Ramerrez) the opportunity to rob the camp. The entire camp sets out to hunt for Ramerrez, while Minnie remains alone with Dick. Dick's growing feelings for Minnie make it impossible for him to overpower her and rob the woman who has stayed behind to defend the hidden stocks of gold with her life. The two agree to meet in her cabin up the mountain later that evening.
Minnie is preparing for Dick's visit to her cabin. When he arrives, she confides in him and tells him about her life, but he conceals his true identity from her. They declare their love for each other, but their idyll is abruptly interrupted by Jack and some of the workers. They reveal Johnson's true identity to Minnie and warn her about him, as he is a criminal. Disappointed, Minnie confronts Dick, and he tries to defend himself. He did not become a bandit by choice; after his father's death, he had to take over his father's band of robbers. But meeting Minnie has shown him the path to a new life. When he notices how deeply Minnie is affected by this breach of trust, he tries to leave, but hardly has he set foot outside when he is hit by a bullet from Jack's gun, who has been lying in wait for him. Minnie's love is rekindled, she takes him back into her cabin and hides her wounded lover. However, a few drops of blood reveal his hiding place to the sheriff, who has returned to have his way with Minnie. Minnie is determined to fight for Dick's life. A game of poker will determine her fate and that of Johnson. If he wins, she will give herself to him and hand Johnson over to him; if she wins, her lover will be hers alone. After Jack has given her his word of honour, she wins the game with trick cards.
Jack has broken his word to Minnie and is intent on capturing Dick. At dawn, he sets out in pursuit of Dick, but at first Dick seems to evade him. Finally, Ashby manages to capture him. Jack wants to make short work of his rival; he incites the mob, and before long they have a noose around Dick's neck. But the lynching stops when Minnie is heard calling. She takes advantage of the general element of surprise and stands protectively in front of her lover. She gradually manages to subdue the hate and murderous intent in the men and persuades them to forgive her lover. Minnie and Dick set off to start a new life elsewhere.