In 1845 in North-Western Territory, British North America, young James Howlett (Troye Sivan) sees his father John Howlett (Peter O'Brien) killed by his friend Victor Creed's father, Thomas Logan (Aaron Jeffery). In an act of vengeance, James kills the elder Logan using bone claws which have grown out of his hands due to the stress of the incident. With his dying breath, Logan tells James that he is also his son. James runs out of the house, followed by Victor, who finds him and promises his younger brother that he'll look out for him. James and Victor (Michael-James Olsen) run away, pursued by a torch-wielding mob.
In the years that follow, adult brothers James (Hugh Jackman) and Victor (Liev Schreiber) are seen fighting together in the American Civil War, World War I, World War II, and eventually the Vietnam War. Their regenerative powers keep them from being killed in the battlefield and they both age considerably slowly compared to non-mutants. James is forced to act as a check on Victor's increasing rage and ferocity. In Vietnam, Victor kills a superior officer after being stopped from raping a girl, and James and Victor are sentenced to death by firing squad, though their unique regenerative abilities keep them alive.
While they are incarcerated, Major William Stryker (Danny Huston) approaches the two mutants and offers them membership in Team X, his elite group of mutants. The team consists of mutants Fred Dukes (Kevin Durand), who possesses super strength and invulnerability; John Wraith (Will.i.am), who can teleport; Chris Bradley (Dominic Monaghan), a.k.a. Bolt, who can control electricity and possesses telekinetic abilities; expert marksman Agent Zero (Daniel Henney); and mercenary Wade Wilson (Ryan Reynolds), an amazing swordsman who never stops talking. The brothers join the group and are sent to the team's first mission: Invade the headquarters of a diamond trafficking operation in Lagos, Nigeria, to retrieve a meteorite. When Stryker asks the diamond smuggler about the source of the meteorite, the smuggler tells him that it came from a remote village further into Nigeria. The team goes there and Stryker and the team brutally interrogate the local people to learn where the meteorite was found. James is disgusted by the murders committed by his teammates and abandons the group over Victor's persuasions and protests.
Six years afterward, James -- now going by his last name, Logan -- is a lumberjack living with his girlfriend Kayla Silverfox (Lynn Collins). Meanwhile, Victor hunts down and murders Bradley, who works at a circus; Victor mentions that Wade is already dead. Stryker locates Logan and claims that someone is killing members of the now-disbanded team. Stryker asks Logan for help, but is refused. Shortly after, Silverfox is murdered by Victor. Wolverine hunts down his half-brother, but is easily defeated. Stryker once again asks Logan for help, and Logan agrees. Stryker has Logan's skeletal system reinforced with adamantium, a virtually indestructible metal retrieved from the meteorite source found by Team X in Nigeria. Before the procedure, Logan asks for his new dog tags to say "Wolverine," a reference to a story that Kayla told him. After the procedure, Stryker orders Wolverine's memory to be erased, but Wolverine overhears this and flees. Stryker orders Agent Zero to hunt him down and take his head off.
An elderly couple, Travis (Max Cullen) and Heather Hudson (Julia Blake), see Wolverine -- who escaped in the buff -- enter their barn. They're wary but welcoming, giving him food and clothing, including a leather jacket of their son's -- and their son's motorcycle. The next morning, both are shot dead by Zero. Wolverine takes out several HMMWVs, a helicopter and Zero himself, telling Stryker over Zero's radio, that he'll hunt him down. Stryker warns Wolverine that if he chooses to go after the answers he seeks, he won't like what he finds.
Wolverine locates former associates John Wraith and Fred Dukes (who is now massively obese from a guilt-driven eating disorder), seeking to learn the location of Stryker's new laboratory. After beating Dukes in a boxing match, Wolverine learns the disbanded team had been capturing young mutants for Stryker. One of them, Remy LeBeau (Taylor Kitsch), also known as Gambit, escaped the island laboratory and knows its location. Dukes tells Logan that his brother Victor is actually working for Stryker, capturing and killing mutants for him. Meanwhile, Stryker captures a teenaged Scott Summers (Tim Pocock) with Victor's aid.
Wolverine and Wraith locate Gambit in a New Orleans bar. Wolverine talks to Gambit while Wraith keeps watch outside, but Gambit suspects Wolverine was sent to recapture him and, using his ability to charge objects with kinetic energy, throws several playing cards at Wolverine that send him flying through a wall. Outside, Wolverine sees Victor has killed Wraith and taken a sample of his blood. Wolverine fights Victor, only to be interrupted by Gambit. Victor escapes, and after a brief struggle, Gambit agrees to take Wolverine to the Stryker's secret mutant prison/laboratory.
The facility turns out to be Three Mile Island. Once there, Wolverine confronts Stryker and learns Silverfox is still alive; Victor faked her death with hydrochlorothiazide. She was keeping track of the mutant to free her sister, Emma Frost (Tahyna Tozzi), who is also in the prison. Wolverine is devastated by this betrayal.
Now having no quarrel with Stryker, Wolverine departs. Victor, angered that Stryker let Wolverine go, demands the adamantium procedure. Stryker, however, tells him that he won't survive the procedure and in an act of rage, Victor tries to kill Silverfox, her power of persuasion failing to influence Victor despite her physical contact with him. Wolverine hears Silverfox's screams and attacks Victor. Finally having the chance to kill Victor, Wolverine chooses not to give in to his animal instincts and instead knocks him out. Silverfox shows Wolverine to the holding cells, and he frees the mutants there; among them are Emma Frost and Scott Summers.
Panicking, Stryker prematurely activates his newest creation, Weapon XI (Scott Adkins and Ryan Reynolds), a bald, pale-skinned and deformed Wade Wilson, lacking a mouth and with patterns on his skin marking his adamantium bone structure. As the rescue party approaches an exit, it is blocked by Weapon XI, who is under Stryker's control. Wolverine tells them to find a new exit as two long blades extend from Weapon XI's arms. The blades are similar to Wolverine's claws, but more like katana swords, Wilson's weapon of choice. Wolverine realizes that this monstrosity is actually Wade Wilson. "Looks like Stryker finally found a way to shut you up," he quips.
Weapon XI, also called Deadpool, is a mutant Frankenstein's monster, with the abilities of several of the killed and captured mutants: Summer's optic blasts, Wraith's teleportation, and Wolverine's healing ability. During the escape, Silverfox is mortally wounded. The other mutants escape through the facility's tunnels, guided by Scott who is unable to tell them how he knows the way out. Emerging from the tunnel, the party encounters a helicopter. Riding in the helicopter is a familiar figure: Professor Charles Xavier (Patrick Stewart), who has guided them to safety and offers them a home at his school.
Meanwhile, the fight between Wolverine and Weapon XI moves to the top of one of the nuclear power plant's cooling towers. Weapon XI overpowers and prepares to decapitate Wolverine, but Victor returns to aid his brother. Wolverine and Victor, now working together, are able to decapitate Weapon XI, sending its head, still firing optic blasts, down into the cooling tower. Wolverine coldly informs Victor that despite his help, their relationship is over. Victor reminds him that as brothers, they can never be finished, and jumps off the the cooling tower. The damage from the optic blasts causes the cooling tower to collapse, but Wolverine is rescued by Gambit.
Wolverine asks Gambit to ensure the prisoners are safe, while he returns to find Silverfox, who stayed behind because she was wounded. As he carries her to safety, Stryker shoots him in the back with an adamantium bullet. Wolverine charges Stryker to kill him but is shot in the head, knocking him unconscious.
Stryker approaches Silverfox and prepares to shoot her as well but she uses her powers of persuasion to order Stryker to first throw away the pistol and then walk away until his feet bleed. She then dies from her injuries. Gambit returns to assure Wolverine that the mutants are safe, but due to amnesia caused by the brain damage the adamantium bullets inflicted, Wolverine does not remember anything (this was Stryker's intention, knowing that even the adamantium bullets could not kill Logan but will cause amnesia). Gambit tries to get Wolverine to come with him, but he declines. Gambit wishes Wolverine good luck before departing, and Wolverine flees the scene as the ambulances and police arrive.
The film has several additional scenes during and after the credits. The first of these scenes plays a few seconds into the credits, and depicts William Stryker walking down a road. Due to Silverfox's order, the toes of his shoes are torn and bloody from walking for so long. A military vehicle drives up behind him and he is apprehended by military police for questioning about the death of General Munson. (Stryker murdered the general earlier in the film in order to protect his vendetta against mutants.)
Depending on which theater the movie was shown in, one of two possible endings then appears following the credits. In the first ending, Weapon XI's hand reaches out from the rubble of the nuclear complex to touch his severed head. Deadpool's mouth is now open and he says "Shhhhhhhh" to the audience. The second alternate ending shows Logan drinking at a bar in Japan. The bartender asks if he is drinking to forget; Logan replies that he's drinking to remember.