Henri Charrière (Steve McQueen), a safecracker nicknamed “Papillon” because of the butterfly tattoo on his chest, is wrongly convicted of murdering a pimp. In 1933 he is sentenced to life imprisonment within the penal system in French Guiana. En route, he meets a fellow convict, Louis Dega (Dustin Hoffman), a forger and embezzler who is convinced that his wife will secure his release. Papillon offers to protect Dega if he will underwrite the former’s escape once they reach French Guiana. Enduring the horrors of life in a jungle labor camp, the two eventually develop a friendship.

One day, Papillon defends Dega from a sadistic guard and escapes into the jungle, but is captured and sentenced to solitary confinement. In gratitude, Dega has extra food smuggled to Papillon. When the smuggling is discovered, the warden screens Papillon’s cell in darkness for six months and cuts his rations in half, believing that it will force him to reveal his benefactor. Though emaciated and half-insane, and reduced to eating insects to survive, Papillon refuses to give up Dega’s name. After two years, he is released and sent to the infirmary in St-Laurent-du-Maroni to recover.

Papillon sees Dega again and asks him to help arrange for another escape attempt. Dega arranges for him to meet an inmate doctor, who offers to secure them a boat on the outside with the help of a man named Pascal. Fellow prisoner Clusiot (Woodrow Parfrey), and a gay orderly named André Maturette (Robert Deman) join the escape plot. During the escape, Clusiot is knocked unconscious by a guard. Dega is forced to subdue the guard and reluctantly joins Papillon and Maturette, climbing the walls to the outside. Dega fractures his ankle in the fall. The trio meet Pascal and the men escape into the night. In the jungle the next day, Pascal delivers the prisoners to their boat. After he leaves, they discover that it is a fake. They encounter a local trapper (John Quade), who reveals that he had killed the bounty hunters that were waiting for them, and guides the three to a nearby leper colony, where they obtain supplies and a seaworthy boat.

The trio eventually land in Colombia, and are accosted by a group of soldiers, who open fire and wound Maturette. He is captured along with Dega, still crippled by his broken ankle, while Papillon is forced to flee. Papillon evades the soldiers and lives for a long period with a native tribe; he awakens one morning to find them gone, leaving him with a small sack of pearls. Papillon travels to a police checkpoint and pays a nun to take him to her convent. There he asks the Mother Superior for refuge, but she instead turns him over to the authorities.

Papillon is brought back to French Guiana and sentenced to another five years of solitary confinement. He emerges a graying old man along with Maturette, whom he sees just before the latter dies. Papillon is then moved to the remote Devil’s Island, where he reunites with Dega, who has long given up all hope of being released. From a high cliff, Papillon observes a small cove where he discovers that the waves are powerful enough to carry a man out to sea and to the nearby mainland. Papillon urges Dega to join him in another escape, and the men make two floats out of bagged up coconuts. As they stand on the cliff side, Dega decides not to escape and begs Papillon not to either. Papillon embraces Dega a final time, and then leaps from the cliff. Grasping his float, he is successfully carried out to sea.

A narrator states that Papillon made it to freedom, and lived the rest of his life a free man.