In 1913 Texas, Pike Bishop, the leader of a gang of aging outlaws, is seeking retirement after one final score: the robbery of a railroad office containing a cache of silver. The gang is ambushed by Pike’s former partner, Deke Thornton, who is leading a posse of bounty hunters hired and deputized by the railroad. A bloody shootout kills several members of the gang. Pike uses a serendipitous temperance union parade to shield their getaway, and many citizens are killed in the crossfire.
Pike rides off with Dutch Engstrom, brothers Lyle and Tector Gorch, and Angel, the only survivors. They are dismayed when the loot from the robbery turns out to be a decoy: steel washers instead of silver coin. The men reunite with old-timer Freddie Sykes and head for Mexico.
Pike’s men cross the Rio Grande and take refuge that night in the village where Angel was born. The townsfolk are ruled by General Mapache, a corrupt, brutal officer in the Mexican Federal Army, who has been ravaging the area’s villages to feed his troops, who have been losing to the forces of the revolutionary Pancho Villa. Pike’s gang makes contact with the general.
A jealous Angel spots Teresa, his former lover, in Mapache’s arms and shoots her dead, angering Mapache. Pike defuses the situation and offers to work for Mapache.
Mapache tasks the gang to steal a weapons shipment from a U.S. Army train so that Mapache can resupply his troops and appease Commander Mohr, his German military adviser, who wishes to obtain samples of America’s armaments. The reward will be a cache of gold coins.
Angel gives up his share of the gold to Pike in return for sending one crate of rifles and ammunition to a band of rebels opposed to Mapache. The holdup goes largely as planned until Thornton’s posse turns up on the train the gang has robbed. The posse chases them to the Mexican border, only to be foiled again as the robbers blow up a trestle spanning the Rio Grande, dumping the entire posse into the river. The pursuers temporarily regroup at a riverside camp and then quickly take off again after the Bunch.
Pike and his men, knowing they risk being double-crossed by Mapache, devise a way of bringing him the stolen weapons without his double-crossing them. However, Mapache learns from Teresa’s mother that Angel stole a crate of guns and ammo, and reveals this as Angel and Engstrom deliver the last of the weapons. Surrounded by Mapache’s army, Angel desperately tries to escape, only to be captured and tortured. Mapache lets Engstrom go, and Engstrom rejoins Pike’s gang and tells them what happened.
Sykes is wounded by Thornton’s posse while securing spare horses. The rest of Pike’s gang returns to Agua Verde for shelter, where a bacchanal celebrating the weapons transfer has commenced. They see Angel being dragged on the ground by a rope tied behind the general’s car, and after a brief frolic with prostitutes and a period of reflection, Pike and the gang try to forcibly persuade Mapache to release Angel, who by then is barely alive after the torture.
The general appears to comply; however, as the gang watches, he instead cuts Angel’s throat. Pike and Engstrom angrily gun Mapache down in front of his men.
For a moment, the federales are so shocked that they fail to return fire, causing Engstrom to laugh in surprise. Pike calmly takes aim at Mohr and kills him, too. This results in a violent, bloody shootout—dominated by the machine gun—in which Pike and his men are killed, along with most of Mapache’s present troops and the remaining German adviser.
Thornton finally catches up. He allows the remaining members of the posse to take the gang members’ bullet-riddled bodies back to collect the reward, while electing to stay behind, knowing what awaits the posse.
After a period, Sykes arrives with a band of the previously seen Mexican rebels, who have killed off what’s left of the posse along the way. Sykes asks Thornton to come along and join the revolution. Thornton smiles and rides off with them.