Cable Hogue is isolated in the desert, awaiting his partners, Taggart and Bowen, who are scouting for water. The two plot to seize what little water remains to save themselves. Cable, who hesitates to defend himself, is disarmed and abandoned to almost certain death.
Confronted with sandstorms and other desert elements, Cable bargains with God. Four days later, about to perish, he stumbles upon a muddy pit. He digs and discovers an abundant supply of water.
After discovering that his well is the only source of water between two towns on a stagecoach route, he decides to live there and build a business. Cable’s first paying customer is the Rev. Joshua Duncan Sloane, a wandering minister of a church of his own revelation. Joshua doubts the legitimacy of Cable’s claim to the spring, prompting Cable to race into town to file at the land office.
Cable faces the mockery of everyone he tells about his discovery. That does not deter him from buying 2 acres (0.8 ha) surrounding his spring. He immediately goes to the stage office to drum up business but is thrown out by the skeptical owner. He pitches his business plan to a bank president, who is dubious about the claim. Cable impresses the banker with his attitude and he is staked to $100.
Cable, who hasn’t bathed since his desert wanderings, decides to treat himself to a night with Hildy, a prostitute in the town saloon. They quickly develop a jovial understanding but before they can consummate the transaction, Cable remembers that he has still not set up his boundary markers and rushes out, much to Hildy’s chagrin. She chases him out of the saloon in a sequence that wreaks havoc on the town.
Back at the spring, Cable and Joshua get to work, dubbing the claim Cable Springs. The two decide to go into town and are drunk by the time they arrive. Cable makes up with Hildy and spends the night with her, leaving Joshua to pursue his passion: the seduction of emotionally vulnerable women.
Cable and Joshua continue to run the robust business, delighting in shocking the often genteel travelers with the realities of frontier life. In moments of solitude, Cable and Joshua philosophize on the nature of love and the passing of their era. Joshua decides that he must return to town. Hildy arrives at Cable Springs having been “asked” to leave by the modernizing townfolk, who can no longer abide open prostitution in their midst. She tells Cable that she will leave for San Francisco in the morning but winds up staying with him for three weeks. This time elapses during a tender, romantic montage.
Then one day, Taggart and Bowen arrive on the stagecoach. Cable lets them believe that he bears them no ill will, and he alludes to a huge stash of cash that he has hoarded, knowing that the two men will return to steal it. When they do, Cable outwits them, by throwing rattlesnakes into the pit they have dug. When they surrender, he orders them to strip to their underwear to venture into the desert, just as he had been forced to do. Taggart, believing Cable will once again hesitate to defend himself, reaches for his gun but Hogue shoots him dead.
A motor car appears, driving right past Cable Springs with no need or interest in stopping for water. The drivers laugh at the archaic scene of western violence as they race past. “Went right on by,” says Cable in amazement. “Well, that’s gonna be the next fella’s worry.”
Cable takes mercy on the grovelling Bowen. He even gives him Cable Springs, having decided to go to San Francisco to find Hildy. The stagecoach arrives and Cable gets ready to pack up when suddenly another motorcar  appears. This one does stop and Hildy emerges, opulently dressed. She has become prosperous and, now on her way to New Orleans, has come to see if Cable is ready to join her. He agrees but while he loads the motorcar he accidentally trips its brake. The car runs over him as he pushes Bowen out of the way.
Joshua, who arrives by a black motorcycle with a sidecar, gives a eulogy for Cable as he dies. This segues into a funeral with the cast standing mournfully over Cable’s grave. They are grieving not only the death of the man but the era he represents. The stagecoach and motorcar drive off in opposite directions. A coyote wanders into the abandoned Cable Springs. But the coyote has a collar – possibly symbolising the taming of the wilderness.