After a failed attempt to rescue his first mate, Joshamee Gibbs, in London, Captain Jack Sparrow is brought before King George II, who wants Jack to guide an expedition to the Fountain of Youth before King Ferdinand and the Spanish Navy can locate it. Heading the expedition is Jack's old nemesis, Captain Hector Barbossa, now a privateer in service to the British Navy after losing his leg and ship, the Black Pearl, which he believes to be sunk.
Jack refuses the King's order and then after successfully evading the King's Royal Guards, Jack meets with his father, Captain Teague, who warns Jack about the Fountain's rituals. Jack then finds out that someone is impersonating him to recruit a crew to find the Fountain. He later confronts the impostor and only to find out it was Angelica, Jack's former lover and the daughter of the ruthless pirate Blackbeard, who practices voodoo magic and wields a magical sword that controls his ship, the Queen Anne's Revenge.
While Jack is shanghaied aboard Blackbeard's ship, Gibbs narrowly escapes execution by memorizing and destroying Jack's personal map, forcing Barbossa to spare him so he could navigate to the Fountain.
Meanwhile, after a failed mutiny aboard the Queen Anne's Revenge, Jack is forced to lead the way to the Fountain. Blackbeard seeks the Fountain's power to circumvent his predestined fatal encounter with "a one-legged man" (Barbossa) as foretold in a prophecy. During the voyage, Jack learns that he must find two silver chalices, both believed to be found aboard Juan Ponce de León's missing flagship, the Santiago.
The Fountain's water must be consumed simultaneously from the two special chalices. Any individual drinking from the chalice containing a mermaid's tear has their life extended, while the other dies, their life drained from their body and remaining years 'donated' to the other. With Angelica's help, Jack also learns that the Black Pearl didn't sink, but that it was shrunk and added to a collection of captured ships in bottles by Blackbeard.
The Queen Anne's Revenge charts a course for Whitecap Bay - where he hopes to harvest tears from a mermaid. A small boat of pirates is set adrift as bait; led by Tamara, the mermaids obligingly seduce and massacre them. In the ensuing battle Blackbeard captures a mermaid. Philip Swift, a captive missionary, falls in love with the mermaid and names her Syrena.
Reaching the unchartered island where Ponce de León's ship had been stranded, Angelica and Blackbeard coerce Jack into retrieving both chalices. By the time Jack locates the decaying vessel, sitting on the edge of a cliff, he meets with Barbossa, who he finds waiting aboard. However, the two discover a Spanish expedition have claimed the chalices first.
Seemingly wanting to achieve the same goal, Jack and Barbossa sneak into the Spanish camp to steal the chalices. However, it is later revealed that Barbossa was originally waiting aboard the Santiago for Blackbeard. Barbossa declares he is only interested in seeking revenge against Blackbeard for attacking the Black Pearl, which he still believes is sunk, during which he was forced to amputate his own leg to escape.
Joining forces, Jack and Barbossa escape the camp with the chalices. Meanwhile, Syrena, reciprocating Philip's love, is tricked into shedding a tear which Blackbeard collects, leaving her to die. Philip is forced to continue the journey as a hostage. Jack returns with the chalices and Gibbs, with whom he had reunited while assisting Barbossa. Jack and Blackbeard bargain for Angelica's safety, Jack's confiscated magical compass, and Gibbs' release.
In return, Jack vows to give Blackbeard the chalices and lead him to the Fountain; Blackbeard agrees and Gibbs departs with the compass. At the Fountain, Blackbeard's crew are confronted by Barbossa, causing a vicious skirmish. Subsequently, the Spanish arrive to unexpectedly destroy the Fountain, believing the Fountain's power to be an abomination against God.
During the confusion, Barbossa stabs Blackbeard with his poisoned sword. Angelica pulls the sword out of Blackbeard but is cut and poisoned, too. Barbossa gets ahold of Blackbeard's magic sword, allowing him to gain control of the Queen Anne's Revenge and its crew. Philip is also mortally wounded in the melee.
Nevertheless, he returns to free Syrena, who retrieves the missing chalices and gives them to Jack, telling him not to waste her tear. Syrena finds Philip, who is dying. Philip asks Syrena for her forgiveness. She kisses him and they disappear underwater together.
With Blackbeard and Angelica both nearing death, Jack brings the chalices to them and tries to convince Angelica to drink from the one with the tear, but Blackbeard grabs it and drinks, asking his daughter to sacrifice herself by drinking from the other one. Angelica agrees. Anticipating that the self-serving Blackbeard would choose to sacrifice his own daughter, Jack has lied about which chalice contains the tear to save both Angelica's life and Blackbeard's soul.
Angelica's wounds are healed while the Fountain consumes Blackbeard's body, killing him. Although Angelica claims to be in love with Jack, he remains uneasy about her intentions and leaves her stranded on a cay barefoot with a pistol containing one shot. Angelica fires the shot at Jack as he rows away, but misses.
Now wielding Blackbeard's magical sword, Barbossa absconds with the Queen Anne's Revenge, having returned to piracy and happily sailing to Tortuga with his new crew. Jack finds Gibbs, who had used his compass to locate the Revenge and reclaim the shrunken Black Pearl and the armada of other conquered ships in bottles in a gunny sack. Hoping to find a way to revert the Black Pearl to its original size, the two head off into the sunset, determined to continue their pirate life.
In a post-credits scene, a voodoo doll of Jack crafted by Blackbeard washes ashore and is claimed by a grinning Angelica.