In 1925, in Tampico, Mexico, down-and-out Fred C. Dobbs is hired to work in an oil field, where he meets another American named Curtin. After the job is finished, Dobbs and Curtin head for a flophouse for the night. There, Howard, an old prospector, talks about men who succumbed to gold fever and lost everything, and Dobbs swears that would never happen to him. Having learned that Pat McCormick, the man who hired them, has a reputation for defaulting on the money he owes his men, Dobbs and Curtin demand that he pay them immediately. McCormick puts up a fight, but Dobbs and Curtin overpower him and take their money. They then ask Howard to help them prospect for gold. Using their pay and the money from Dobbs's winning lottery ticket, the three men head toward the Sierra Madre mountains. When their train is attacked by bandits, the Americans help fight them off, but a sudden motion of the train prevents Dobbs from killing their leader, Gold Hat. Later, in a small village, the men buy burros and supplies and head for undiscovered territory. Just as the exhausted Dobbs and Curtin decide to quit, Howard informs them that they have located a rich lode of gold. After a while, Dobbs begins to suspect the others of cheating him and suggests that they divide up the gold as they go along. Just as Howard had warned, the men become suspicious of each other. When Dobbs is caught in a cave-in, Curtin briefly considers leaving him to die, in order to get a larger share of the treasure. One day, when Curtin goes into the valley for supplies, he encounters Cody, a Texan, who questions him closely about the territory because he is sure that there is gold in the surrounding mountains. Although Curtin lies about his business, Cody follows him to the camp site and suggests that they make him a partner. Secretly, the others decide to kill Cody, but before they can take action, the camp is attacked by bandits, led by Gold Hat. Although the bandits are scared off by the appearance of federal soldiers, Cody is killed in the crossfire. The gold streak thins out and the men leave the camp. When Curtin suggests that they give a fourth of their gold to Cody's widow, Howard agrees, but Dobbs greedily refuses. Later, Howard helps revive an Indian child after he falls in the water and is forced to visit their village to allow them to repay their debt to him. Dobbs and Curtin continue on to Durango and, while in the desert, Dobbs, who has become obsessed with the gold, urges Curtin to steal Howard's share. When Curtin refuses, Dobbs accuses him of conspiring with Howard to get rid of him. Fearing for his life, Curtin tries to stay awake all night, but when he finally falls asleep, Dobbs shoots him and leaves him for dead. Curtin manages to crawl away and is found by Indians and brought to the village where Howard is being honored. When Howard learns what transpired, he and Curtin ride after Dobbs. Meanwhile, Dobbs is attacked by Gold Hat's bandits, who kill him and steal his boots and burros. They do not recognize the dust as gold-laden and, assuming that it is sand used to make the hides that cover it weigh more, dump it in the desert. In Durango, the bandits are captured when they try to sell the burros and are shot. Howard and Curtin are later taken to the place where Dobbs was murdered and, as they search for whatever remains of the gold, a storm blows the dust back toward the Sierra Madre mountains. Laughing at the irony of their situation, Howard decides to return to the Indians and spend the rest of his life as their medicine man, while Curtin plans to go to Dallas and visit Cody's widow.