The movie opens with an offical explaining the facts of life to a group of prisoners. The scene switches to a city in France where a large group of men are being paraded at gunpoint through a street crowded with onlookers, police and media. A rich looking woman waves forlornly to a man wearing glasses. They board a freighter and are put in cells in the ship's hold.
The men begin to talk about the short bespectacled man, Dega, who is said to be a reknowned counterfeiter, who may have a lot of concealed money. The prisoners begin their voyage and are shown in various daily routines. The blue-eyed man with a large butterfly tattoo, Papillon, has a knife, decides to befriend Dega and promises to protect him. Some men are seen to be getting ill and weak in the heat as the ship travels south. Papillon is tanned, fit and confident looking. Two men attempt to assault Dega during the night, Papillon manages to fight them off but is placed in irons. Finally the ship arrives at it's destination in French Guiana, the men see three small islands in the distance and mention they are high security prisons.
While lining up to disembark one prisoner, Julot, a "two time loser", asks for Papillon's shiv and cuts his own knee, he pretends to fall down the gangplank and he is carried off on a stretcher. A young man walks into the ocean and is summarily shot and killed. The prisoners are marched through a town of onlookers, assembled at the main camp, Penetencier de st. Laurent, and told that if they try to escape they will get two years in solitary, a second attempt means five years solitary and a third attempt means the guillotine. They are issued red and white striped uniforms. In the barracks an older prisoner/trustee recognizes Dega and explains that an easy job is available for a price. A struggling prisoner is brought in front of the assembled camp and is guillotined. Papillon and Dega stick together, they have a medical exam and just before they are assigned to the easy work a senior guard says Dega's counterfeiting cost his family a lot of money and assigns them to a hard labour logging detail in the swamp.
One day a crocodile attacks the group, Papillon and Dega are told to get it with their bare hands. They meet another prisoner, Clusiot, at lunch break who shares some quinine anti-malaria medicine. Next, the prisoners chase butterflies with nets. Dega catches a big blue one. Papillon approaches the butterfly buyer and asks for help to escape. Arrangements are made for two weeks later. Papillon tries to convince Dega to come also. Julot's corpse is brought in with his throat slit, Degas is sickened and causes a commotion, Papillon escapes. Dega gets new bifocal glasses. Papillon comes to the butterfly buyer's camp and is immediately taken at gunpoint, betrayed.
He is taken to "Reclusion" and told the rules. He is placed in a small cell 5 paces wide and starts walking back and forth and do push ups. His food and water are passed in through a small hatch, despite the poor food he vows to eat all. One day he finds a piece of cocoanut in his water bucket and a note from Dega. Eventually the guards discover the extra food and try to find out from Papillon who arranged it for him. He refuses to talk and is placed on half-rations. Then his ceiling is covered and he is placed in almost complete darkness. Over time Papillon gets very weak and hallucinates, thinking back on a wasted life, later fantasizing about a triumphant return to France with Dega. He is near death and reduced to eating insects when suddenly he is released as his solitary period is ended. He is taken back to the main camp.
Slowly regaining his strength he renews his friendship with Dega, who appreciates that Papillon never gave him up. In the hospital ward he notices a young prisoner, Maturette, who is molested by a trustee. Maturette admits he is homosexual and will help Papillon if he can come too. Papillon starts planning a new escape with the Maturette and Clusiot. A prisoner doctor says he can make suitable arrangements for a price. Dega refuses to go along but gives Papillon money and a map. During a band concert night the three try their escape, a guard is alerted and Clusiot is hurt. Papillon and Maturette get over the wall and encourage Dega to join them. Dega breaks his ankle when falling over the wall. The three escape into the jungle, they had paid 3000 to buy a boat but find the boat is useless. A trapper with strange facial tattoos shows them he killed two men who had been waiting for the three escapees. He helps them escape down the river to a leper colony.
At the leper colony the leader tests Papillon by telling him to smoke his cigar. Papillon does so and the man says he has non-contagious leprosy. The lepers give the three escapees a boat and some money and the three sail off toward the Honduras.
At sea they scavenge water and eat turtles, endure storms and heat. Dega's broken ankle gets worse, Maturette knows some medicine and tries to do first aid . Eventually they land on a sandy beach and are immediately confronted by a small group of Spanish-speaking soldiers. Degas lies there in the sand and the other two scatter. Papillon meets a Spanish prisoner and together they run off deeper into the jungle. The Spanish prisoner is impaled on a booby trap and Papillon is hit with a blowgun dart and falls into a river.
He awakes in a village of primitive natives. They live in thatch huts on a beach, fish for pearls and a nubile young woman helps Papillon regain his strength. The chief has Papillon give him a butterfly tattoo just like Papillon's. One day he wakes up and the natives are all gone, they have left him a small bag with some pearls. Somewhere he gets newer clothes and appears to be a regular European tourist. At a border crossing he tries to join a religious caravan, they let him join them to cross. At the church, Papillon declares to the Mother Superior he is an innocent man who never killed anyone, he gives the nun his pearls in a show of good faith. Asleep on a clean bed, he is rousted awake and taken at gunpoint. The nun has betrayed him.
Five years later(or more?), Papillon is released from Reclusion with white hair and looking very old. He meets a dying Maturette in the courtyard. He is taken to Devil's Island and assigned a cabin where he is told to fend for himself. He meets Dega who is also on the island and who has a tidy cabin, a carrot garden and a few pigs, but is a bit off, mentally.
Papillon begins observing the waves and currents and begins planning another escape. He figures out that every 7th wave is big enough to carry a floating object out to sea. He fashions two large floats and seems to have Dega convinced to escape with him. When it is time to go Dega changes his mind. The two friends hug and Papillon jumps off a cliff into the ocean timing to meet the 7th wave. He is carried out to sea clinging to his float. A voice over says he makes it to freedom and outlives the prison. The final scenes are of the abandoned prison overgrown by the jungle.