With The Treasure of the Sierra Madre, Dobbs and Curtin are two out of work Americans living in Tampico, Mexico, ca. 1925. They meet Howard, an old prospector, who puts the idea of mining gold to make money in their head. The three men pool their money to finance a gold mining expedition in the Sierra Madre mountains.
The journey is perilous. They escape from a train where a group of banditos, led by an hombre named Gold Hat, attacks them on horseback, and then barely survive an inhospitable terrain that wears on Dobbs and Curtin. Howard, on the other hand, is a old pro at this and gets along just fine with all the obstacles.
Howard finds a spot for the group to mine for gold, and its a successful venture, but as quickly as they strike it rich, Dobbs’ greed gets the better of him. Secretly, he wants the whole booty for himself, and in time, he will do anything to get it.
Dobbs becomes paranoid of his partners; thinking that they will kill him for his portion of the gold. This paranoia is soon exacerbated by the arrival of James Cody to their hidden camp. Dobbs wants to immediately kill Cody, but the other two aren’t sure. Dobbs convinces them that this is the best solution for keeping their mine secret.
Before they can kill Cody, the Gold Hat and his merry amigos show up again, this time posing as Federales, but they don’t have any stinkin’ badges. A gunfight ensues, and many banditos are killed along with Cody. Before the banditos can rally to kill Dobbs, Curtin, and Howard, the real Federales arrive with their badges, and chase the men off.
Later, Howard is asked by local Indians to come to their village, and save a little boy who has survived a drowning, but won’t wake up. Howard works some frontier magic on the tot, and saves him. Howard humbly returns back to the camp, but the next day, the villagers insist Howard return to be honored just as the three men are heading home with their mules to cash in their booty. Howard agrees to go, and Dobbs and Curtin agree to watch over his mules and portion of the booty; deciding to wait to cash in on the gold until Howard can catch up to them.
As Dobbs and Curtin argue along the trail. Overwhelming greed consumes Dobbs to the point that his paranoia won’t let sleep from the fear of Curtin killing him. Curtin is now openly afraid of Dobbs, and refuses to sleep as well. Eventually, Curtin does fall asleep, and Dobbs shoots him; leaving him for dead.
Dobbs takes all mules full of booty, and heads out on his own. Unknown to him, Curtin isn’t dead, and he makes it back to the village where Howard is being honored. Howard gets a posse of villagers to get their booty back.
Dobbs doesn’t make it too far before he is dying of thirst. He finds a waterhole to cool off and recover, but Gold Hat returns again with two of his men. He chops off Dobbs head with a machete, and it splashes into the waterhole.
Gold Hat steals Dobbs’ mules of booty, but he and his amigos aren’t very bright. They think the bags of gold are actually bags of sand used to make the burros weigh more so Dobbs can sell them for a higher price. They cut open the bags and dump out all the booty across the barren desert. Gold Hat takes the donkeys to the next village to sell them, but a boy recognizes the brand on them and reports the men. The three banditos are captured and forced to dig their own grave before being shot by the policia.
Curtin and Howard arrive to the sounds of the firing squad killing the banditos. They learn that the gold isn’t with the burros, and head to where they think the banditos dropped the gold. Unfortunately a dust storm has been blowing for quit some time, and their gold flies away with it. All that is left are the empty bags of their cut open booty. Their expedition is a total loss, so Curtin and Howard do the only thing the can. They laugh away at the big joke that’s been played on them.
Howard returns to the little village to live his life out as an honorary God while Curtin heads off to Dallas to find Cody’s widow, and plow her fertile fields.