The fifth installment of the Disney franchise will see the return of Johnny Depp as Captain Jack Sparrow and Geoffrey Rush as Barbosa, with Javier Bardem acting as the film's villain. Orlando Bloom will be also returning as Will Turner, a role he last played in 2007's At World's End.
McCartney is not the first famed English rocker to appear in the Pirates movies. Rolling Stones guitarist Keith Richards played the swashbuckling dad of Depp's Jack Sparrow in At World's End and On Stranger Tides.
During the height of Beatlemania, the singer appeared with his band mates John, George and Ringo in films like A Hard Day's Night and Yellow Submarine.
The new Pirates will set sail in late May.