Jack escapes, but his father, Captain Teague (Keith Richards), finds him and warns Jack about the Fountain's tests. He also reveals that someone is impersonating Jack. The impostor is List of Pirates of the Caribbean characters#Angelica|Angelica (Penélope Cruz), Jack's former lover and daughter of the ruthless pirate List of Pirates of the Caribbean characters#Blackbeard|Blackbeard (Ian McShane), who practices Haitian Vodou|voodoo magic and, with his sword, possesses supernatural powers.
Jack is taken aboard Blackbeard's ship, the ''Queen Anne's Revenge'', and forced to lead the way to the Fountain and to find two silver chalices that once belonged to Juan Ponce de León, both of which are believed to be aboard his lost ship. The Fountain's water must be drunk simultaneously from the two chalices. The person drinking from the chalice containing a mermaid's tear has his life extended, while the other person dies, his years of life drained from his body. Meanwhile, Gibbs, having memorized and destroyed Jack's map, barters with Barbossa to guide him to the Fountain.
Blackbeard wants the Fountain's power to circumvent his predestined fatal encounter with "a one-legged man" and sets a course for Whitecap Bay, where they are attacked by a vicious horde of mermaids. Blackbeard manages to capture a mermaid (Àstrid Bergès-Frisbey) whom Philip Swift (Sam Claflin), a captive missionary, falls in love with and names Syrena. Blackbeard then sends Jack to retrieve the chalices from de León's ship.
When Jack finds the grounded, decaying vessel, Barbossa is waiting inside; the Spanish have already taken the chalices. However, Barbossa only seeks revenge against Blackbeard for capturing the ''Black Pearl'', which forced Barbossa to amputate his own leg to escape. He and Jack join forces to defeat Blackbeard, then head to the nearby Spanish camp to steal the chalices. Meanwhile, Syrena, who returns Philip's love, is tricked into shedding a tear, which Blackbeard collects. He then leaves her to die and forces Philip to go with him. Jack returns with the chalices and Gibbs, whom he had reunited with while helping Barbossa. Jack negotiates with Blackbeard for the return of his confiscated magical compass and the release of Gibbs. In return, he vows to give Blackbeard the chalices and lead him to the Fountain. Blackbeard agrees, and Gibbs departs with Jack's compass.
At the Fountain, Blackbeard and his crew are attacked by Barbossa, and then by the Spanish, who were sent by their king to destroy the Fountain, as he believes its power is an abomination against God. A battle ensues, which culminates in Barbossa stabbing Blackbeard with a poison-laced sword. Angelica accidentally cuts herself with this sword when removing it from her father. Barbossa claims Blackbeard's magical sword and assumes command. He leaves with Blackbeard's crew. Meanwhile, Philip, though mortally wounded, escapes and returns to free Syrena. After finding the chalices that the Spaniards had tossed into deep water, Syrena gives them to Jack, then retrieves the dying Phillip, taking him underwater to save his life.
As both Blackbeard and Angelica lay dying, Blackbeard wants his daughter to sacrifice herself to save him. Angelica willingly agrees, but Jack secretly switches the cups, giving her the one containing Syrena's tear, thus sparing her life and killing Blackbeard. Despite declaring their love, Jack, knowing Angelica may want to avenge her father's death, strands her on an island, intending for a passing ship to pick her up. Meanwhile, Barbossa, who now commands the ''Queen Anne's Revenge'', renounces his ties to the crown and reverts to piracy. Jack finds Gibbs, who used Jack's compass to locate the ''Revenge'' and retrieve the ''Black Pearl'', as well as other captured ships that Blackbeard had magically shrunk and bottled. The two head off, hoping to find a way to return the ''Pearl'' to her original size.