In 1899 Wyoming, Butch Cassidy is the affable, clever, talkative leader of the outlaw Hole in the Wall Gang. His closest companion is the laconic dead-shot “Sundance Kid”. The two return to their hideout at Hole-in-the-Wall (Wyoming) to discover that the rest of the gang, irked at Butch’s long absences, have selected Harvey Logan as their new leader.
Harvey challenges Butch to a knife fight over the gang’s leadership. Butch defeats him using trickery, but embraces Harvey’s idea to rob the Union Pacific Overland Flyer train on both its eastward and westward runs, agreeing that the second robbery would be unexpected and likely reap even more money than the first.
The first robbery goes well. To celebrate, Butch visits a favorite brothel in a nearby town and watches, amused, as the town marshal unsuccessfully attempts to organize a posse to track down the gang, only to have his address to the townsfolk hijacked by a friendly bicycle salesman (he calls it “the future”). Sundance visits his lover, schoolteacher Etta Place and they spend the night together. Butch joins up with them early the next morning, and takes Etta for a ride on his new bike.
On the second train robbery, Butch uses too much dynamite to blow open the safe, which is much larger than the safe on the previous job. The explosion demolishes the baggage car in the process. As the gang scrambles to gather up the money, a second train arrives carrying a six-man team of lawmen. The crack squad doggedly pursues Butch and Sundance, who try various ruses to get away, all of which fail. They try to hide out in the brothel, and then to seek amnesty from the friendly Sheriff Bledsoe, but he tells them their days are numbered and all they can do is flee.
As the posse remains in pursuit, despite all attempts to elude them, Butch and Sundance determine that the group includes renowned Indian tracker “Lord Baltimore” and relentless lawman Joe Lefors, recognizable by his white skimmer. Butch and Sundance finally elude their pursuers by jumping from a cliff into a river far below. They learn from Etta that the posse has been paid by Union Pacific head E. H. Harriman to remain on their trail until Butch and Sundance are both killed.
Butch convinces Sundance and Etta that the three should go to Bolivia, which Butch envisions as a robber’s paradise. On their arrival there, Sundance is dismayed by the living conditions and regards the country with contempt, but Butch remains optimistic. They discover that they know too little Spanish to pull off a bank robbery, so Etta attempts to teach them the language. With her as an accomplice, they become successful bank robbers known as Los Bandidos Yanquis. However, their confidence drops when they see a man wearing a white hat (the signature of determined lawman Lefors) and fear that Harriman’s posse is still after them.
Butch suggests “going straight”, and he and Sundance land their first honest job as payroll guards for a mining company. However, they are ambushed by local bandits on their first run and their boss, Percy Garris, is killed. Butch and Sundance kill the bandits, the first time Butch has ever shot someone. Etta recommends farming or ranching as other lines of work, but they conclude the straight life isn’t for them. Sensing they will be killed should they return to robbery, Etta decides to go back to the United States.
Butch and Sundance steal a payroll and the mules carrying it, and arrive in a small town. A boy recognizes the mules’ brand and alerts the local police, leading to a gunfight with the outlaws. They take cover in a building but are both seriously wounded, and Butch has to make a desperate run to the mules to get ammunition, while Sundance provides covering fire for his dash. As dozens of Bolivian soldiers surround the area, Butch suggests the duo’s next destination should be Australia. They charge out of the building, guns blazing, directly into a firing squad.