In Sonora, Mexico in 1880, Rio (Marlon Brando), his partner Dad Longworth (Karl Malden) and a third man, Doc (Hank Worden), are robbing a bank.
Rio sits on the counter, relaxed, gun pointing at the trapped customers, while all around him is drama and bustle. He observes a woman take off a ring and hide it in a purse. As the bandits escape with loot, he forces the woman to yield him her ring.
The bandit trio escape to a nearby town, where they seek out female company, Doc and Dad in a whorehouse, Rio delicately woos an aristocratic woman, offering her the ring he has just stolen as the only precious thing he owns, a memento of his mother . . .
Mexican mounted police trail the trio to the whorehouse. Doc is killed downstairs, Dad manages to slip out from his prostitutes upstairs room, steal two horses and pick up Rio, who precipitously leaves his high class girl friend, pulling the ring from her finger at the last minute.
The mounted police follow and trap the bandits atop a desert hill, with one of their horses shot.
Rio figures the Rurales will be "swarming all over us inside an hour," and the weary horse cant carry both of them. Their only option is for one of them to ride their single horse to a little post down the canyon about five miles and return with two fresh mounts. Rio fixes the random draw so his pal Dad gets to go. Dad gets to a corral, commandeers two fresh horses practically at gunpoint, but he has second thoughts.
One way back goes to the hilltop, sure to be taken by the Rurales, and in the opposite direction is a treeline behind which are the border and safety. One way lies danger and a poor chance at surviving with half the booty, the other lies a virtual certainty with all of the stolen gold. Upon brief reflection, Longworth leaves his friend to be captured by the Rurales.
After Rio is captured, the posse stops at the corral to ask where Longworth might be, and Rio hears that Longworth took only one horse and sped off in a direction away from where he was waiting.
After almost five years in a Mexican prison, Rio makes an escape, accompanied by Modesto (Larry Duran), a prison pal.
For a time, the sole purpose of his existence is to track down Longworth. Modesto and Rio make the round of cantinas and whorehouses asking whether anyone knows of Longworths whereabouts. After drawing blanks for a while, they arrive at Reds Cantina, the establishment where Doc was shot in the beginning, and there, Dads favorite house girl remembers both Dad and Rio but says she hasnt heard anything in five years.
The girls interest in talking to Rio triggers a confrontation with Bob Amory (Ben Johnson) and Harvey Johnson (Sam Gilman). Rio, frighteningly still and silent, exudes lethal menace and suppressed violence. Bob and Harvey have learned that Longworth is the sheriff Monterey in upper California, and has taken himself a Mexican wife with a teen-age daughter, and where, coincidentally, there is a potentially very lucrative bank that Bob and Harvey are hoping to hold up.
After some tense exchanges, Bob and Harvey say they very much want Rios participation, and the four of them, namely Rio, Modesto, Bob and Harvey agree to travel to Monterey to hold up the bank, and by the way Rio will kill Longworth in revenge.
The foursome arrive in Monterey. While three of them check into the hotel, Rio enters the sheriffs office, manned by deputy Lon (Slim Pickens), and asks to see Longworth. Lon gives out no information, answering questions by questions, frustrating Rio and creating bad blood immediately. Rio leaves the sheriffs office and has no trouble in getting directions to Longworths house, outside town by the beach.
Rio calls on Longworth at his home, talking softly and in an unthreatening manner. A guilt-ridden Dad finds Rio pleasant and apparently willing to forget past differences.
Longworth has become the respectable sheriff of Monterey, California, has married Maria (Katy Jurado), and treats her daughter Luisa (Pina Pellicer) as if she were his own.
Longworth uses the opportunity to "explain" why he never returned to the hilltop, but his story is a lie that contradicts what Rio knows first hand from hearing what happened at the corral in the canyon. Rio pretends to believe him. Of his own story, he conceals the fact that he spent years in prison.
Longworth feigns friendliness and affability, concealing his malice. He and Rio sit, reminiscing cordially about their pasts, while the viewer is left wondering if at any moment the two of them might blowing the others head off. Dad introduces his family, and invites Rio to stay for supper. Longworth is understandably cautious and wary, and becomes uneasy when Rio and stepdaughter Luisa appear to show a romantic interest in one another.
The bank holdup had been planned for the very next morning, but Rio learns that the town is having a fiesta, so the next couple of days all businesses, including the bank, will be closed. The gang has no choice but to delay the planned holdup.
That evening, the respected sheriff gives speeches, circulates among the townspeople backslapping everyone and drinking hard. During the festivities, Longworth meets Rios partners. Rio, asked to explain the poor quality of his new associates, notes there were "slim pickings" after Longworth left.
In conversation, Rio calls Longworth "a one-eyed jack," someone who displays only one side of his personality or life. Longworth now has a reputation as a straight-laced, no-nonsense lawman, but Rio says he has seen the other side of that card.
The fiesta continues, Rio dances and talks with the sweet Luisa, with conflicted feelings and intentions. On the one hand he is sincerely attracted to her, on the other he is using her to get his revenge on Longworth. They dance and talk and both fall in love, and spend the whole night together. At dawn, his conscience begins to get the upper hand and he confesses that many of the things he said the previous night were lies intended to seduce her.
Longworth had drunk too much to keep an eye on Luisa, despite Marias entreaties. He was taken home and Lon was left in charge of finding Luisa. But Lon was distracted, too, and failed, and is waiting at Longworths home in the early morning as Luisa returns home. Lon, who wants Luisa for himself, wakes Longworth to tell him about Luisas night escapade, enraging Longworth at the possible scandal.
Maria, who is a loving and understanding mother, intercedes, and manages to calm Dad Longworth by convincing him that Luisa is truthful when she says nothing happened.
The next morning, in the saloon, Rio is angered when a drunk is mistreating one of the house girls and knocks the drunk down after a warning. The drunk finds a shotgun in a rack and shoots at Rio from the back, but Modesto shouts in time for Rio to roll out of the way at the last instant and from the floor shoot the man dead.
Longworth arrives and pretends to accept it was a justifiable self defense. He asks Rio to help him carry the dead man to a cart outside the saloon. As the man is deposited in the cart, deputies with long guns appear everywhere surrounding Rio, and he lifts his hands in surrender.
Rio is tied to a horse rail, where Longworth first flogs him with a whip, then smashes his right hand with a rifle butt, before putting him on his horse to carry him out of town.
Rio and his partners retreat to a small fishing village on the coast to regroup and recover. For some weeks Rio practices with his gun and slowly regains the use of his right hand. They grow impatient, but Rio assures them he is more than ever determined not only to rob the bank but to kill the sheriff as well.
During this time, Luisa realizes she is pregnant, tells her mother, and reflects on what to do. Luisa seeks Rio out at the fishing village to tell him she still is in love with him, that they can have a future together, but that bright future is strongly at risk if he persists in seeking revenge. Rio listens to her patiently, and assures her of his love for her, but the need to get back at Longworth is too strong, the hatred too deep, and he refuses to give up trying to kill Dad. She returns to Monterey without mentioning she is expecting a baby.
Amory and Johnson have had enough waiting, give an ultimatum that its today or never, and decide to hold up the bank without Rio when Rio demurs. Bob, Harvey and Modesto leave for Monterey, but Bob and Harvey do not trust Modesto for being Rios friend, and they murder him by a cruel trick before proceeding on to Monterey. On the way to the bank, Bob stops at Longworths home to announce that Rio is coming with murderous intent, thus drawing attention away from the holdup and implicating Rio.
At the bank, the holdup goes wrong after the bank teller (Elisha Cook) tricks the gunmen them by handing over one gun without revealing another gun in reserve. In the shootout, Bob and Harvey are killed, and since they were known to be Rios partners, a posse is sent to capture Rio as the mastermind.
Rio meantime has decided to forgo vengeance and leave with Luisa. He is calmly riding into town when he finds himself surrounded, he gives up, and is jailed. He is at the mercy of Longworth, who wants to kill Rio to cover up his own guilt and all earlier betrayals. The volatile, treacherous, arrogant sheriff taunts Rio with the legendary words: "You'll get a fair trial, and then I'm gonna hang you, personally.
Luisa comes to the jail, and reveals that she is pregnant. Later, Luisa brings a pot of her stew to the jail, to be given to Rio as his last meal. The sadistic Lon discovers a hidden Derringer and bullets for it at the bottom of the pot, and laughs. The Derringer is left on a table many feet from the jail bars while Lon is fortuitously summoned away. Grasping his chance, Rio manages to break his bed and bed springs and concoct a lasso of sorts, successfully drags the table closer to him, and he recovers the Derringer. However he has no bullets for it.
Nevertheless, Lon is a coward and Rio manages to intimidate him with the unloaded weapon. Rio gets Lon to hand over the keys, he unlocks his shackles, locks Lon up, and escapes. He breaks in to a place where he gets real weapons, and is about to flee with Luisa, when Lon from his jail cell yells out loudly enough to be heard.
Longworth appears, and a shootout ensues in the center of town, with Rio dodging bullets around the central fountain. Under fire and left with no choice, he tricks Longworth and shoots him. Rio picks up Luisa and in two horses they gallop away. Longworth, dying, manages to get one last shot in the direction of the galloping horses before expiring.
Outside of town, near the shore, Rio and Luisa stop to plan the near future. She will stay behind until the baby is born, he will come back for her after that time, they will get married and go on from there. They kiss goodbye, part, wave at each other, and Rio gallops away.