The 73-year-old music legend will appear for at least one scene in the fifth installment of the "Pirates of The Caribbean" series, reported Deadline.
The movie stars Johnny Depp as Captain Jack Sparrow, Geoffrey Rush as Barbossa, Javier Bardem as the villainous Captain Salazar. Brenton Thwaites and Kaya Scodelario will play new characters and Orlando Bloom returns as Will Turner.
The movie has already wrapped production, but directors Espen Sandberg and Joachim Ronning will be tacking on an extra scene that will feature McCartney.