Set against the rugged backdrop of Wyoming, in the 1900s. Butch Cassidy (Paul Newman) and the Sundance Kid (Robert Redford), the leaders of the famous Hole in the Wall Gang, are planning another bank robbery. As they return to their hideout in Hole-in-the-Wall, they find out that the gang has selected a new leader, Harvey Logan. He challenges Butch to a knife fight, which Butch wins, using a ruse.
Logan had the idea to rob the Union Pacific Flyer train instead of banks. He wanted to rob it twice, the idea being that the return would be considered safe and therefore more money might be involved. Butch takes this idea as his own.
The first robbery goes very well and the Marshal of the next town can't manage to raise a posse. Butch and Sundance listen to his attempts, enjoying themselves. Sundance's lover, Etta Place (Katherine Ross), is introduced. But obviously both men vie for her attention as she also goes bike-riding with Butch, a dialogue-free part of the film, accompanied by "Raindrops Keep Falling on My Head."
The second robbery goes wrong. Not only does Butch use too much dynamite to blow the safe, but also a second train arrives, which is carrying a posse of six heavily armed men on horseback that has been specially outfitted to hunt Butch and Sundance down. The gang flees, but the entire posse follows Butch and Sundance.
They try hiding in a brothel in a nearby town that night, but are betrayed. When they find out the posse is continuing to follow their trail, they try riding double on a single horse in the hope that the posse will split up, but that fails. They then arrive in a nearby town and try to arrange an amnesty with the help of a friendly sheriff (Jeff Corey) of Carbon County. But the sheriff tells them they have no chance of getting one, and that they will be hunted down until they are killed by the posse.
Still on the run the next day, they muse about the identities of their pursuers. They fixate on Lord Baltimore, a famous Indian tracker, and Joe Lefors, a tough, renowned lawman, identifiable by his white skimmer hat (which the lead posse member is wearing).
After climbing some mountains, they suddenly find themselves trapped on the edge of a canyon. With their unseen persuers on their tail, they decide to jump into the river far below, even though Sundance can't swim and would prefer to fight.
Later that day, they arrive at Etta's house and learn from the local newspapers all about the posse and the identities of their pursuers and that they have been paid to stay together until they kill Butch and the Kid. They decide it's time to leave the country. Destination: Bolivia.
After a montage of showing Butch, Sundance, and Etta of their travels to New York, they arrive in a small Bolivian village at the end of the world. Sundance already resents the choice. Their first attempted bank robbery stops before it gets off the ground, as they are unable to speak or understand Spanish. Etta teaches them the words they need.
Their next robbery is clumsily executed, as Butch still needs his cribsheet. After each robbery, they seem to get better, until they are sought by the authorities all over Bolivia.
However, their confidence drops as one evening when Butch, Sundance, and Etta are having dinner at a fancy restaurant in a nearby town when they see a man wearing a white straw hat standing on the other side of the street talking to a few men. Fearing that Lefors is once again after them, Butch suggests going straight, so as to not attract Lefors' attention.
They get their first honest job as payroll guards in a mine, directed by an American, named Garris (Strother Martin). However, on their first working day, they are attacked by highwaymen. Garris is killed, and Butch and Sundance are forced to kill the Bolivian robbers. Ironically, Butch had never killed a man in his entire criminal career, but while they are attempting to go straight, he is forced to kill the bandidos.
Since they seem unable to escape violence regardless of their occupation, they decide to return to robbery. That evening, Etta decides to leave them as she senses that their days are numbered and she doesn't want to watch them die.
A few days later, Butch and Sundance attack a payroll mule train in the jungle, taking the money and the mule. When they arrive in the nearest town, San Vicente, a stable boy recognizes the brand on the mule's backside and alerts the local police. While Butch and Sundance are eating at a local eatery, the police arrive and a climatic gun battle begins.
The two of them manage to find shelter in an empty house, but they're soon low on ammunition. Butch makes a run to the mule to fetch the rest of the ammunition while Sundance covers him, shooting several Bolivian policemen. But even the "fastest gun in the West" cannot match the twenty or more Bolivian policemen at once. Butch manages to retrieve the ammunition and runs back to the house, but they are both wounded.
While tending to their wounds in the house, about 100 soldiers of the Bolivian cavalry arrive and surround the place, eager to get at the notorious 'Bandidos Yanquis'.
The wounded pair discuss where they will be going next, realizing that their time is up (Butch suggests Australia, where at least they speak English). They dash out of the house in a futile attempt to get to their horses. The image freezes and slowly turns to a sepia tone tintype while a voice is heard ordering: "Fuego!" (Fire), followed by the sound of hundreds of rifles being fired in three consecutive volleys....