The Beatles star is set to play at Worthy Farm in June 2020, and apparently checked in with the Queen guitarist regarding animal welfare before confirming the gig.
May previously said he would not play Glastonbury after clashing with organiser Michael Eavis over the badger cull.
The rock star said Sir Paul phoned him up to discuss the matter as he was worried "he might be thought to be endorsing the current mass killing of badgers."
He wrote on Instagram: “Paul was kind enough to phone me about this before he accepted the invitation.
“He was concerned that he might be thought to be endorsing the current mass killing of badgers.
“Paul, a great campaigner on behalf of animals, is firmly against the Badger Cull.
“I told him he should not feel any obligations – that my reluctance to play was based on the personal comments Michael Eavis has made about me.”
May was termed a “danger to farming” by the festival founder due to his opposition to culling badgers.
Eavis’s support for the cull has prompted calls from some to boycott the festival at Worthy Farm.
May claims that the farmer and rock concert organiser “frequently insulted” him so he would not take part in the show, although he wished Sir Paul luck with the performance.
He wrote: “I work daily with people who disagree with me in matters like this – it’s necessary in order to move forward.
“But I don’t have to work with people who insult me who are ignorant of the work I do.
“People can change, and I’m always open to that. In the meantime I wish Paul and his band a great gig.”
May previously said badger culling is a “tragedy and unnecessary crime against wildlife”.
The animals are culled in an attempt to reduce the spread of bovine tuberculosis.
Standard Online has reached out to the organisers of Glastonbury for comment.
McCartney will be returning to Glastonbury 16 years after he first played Worthy Farm in what was, incredibly, his first ever UK festival appearance. He will perform on the Pyramid Stage as the Saturday night headliner for the special 50th anniversary festival .
In 2020, he will become the oldest artist to ever headline Glastonbury.