Britney Spears, Guns N' Roses, Metallica and Sting are also scheduled to perform at the festival at Bela Vista Parque in Lisbon, the BBC reported Monday.
More than 600,000 attendees are expected at the event, which is modelled after the Rio de Janeiro festival, first held in Brazil in 1985.
McCartney's appearance at Rock in Rio will kick off his 12-city tour, which ends June 26 at Britain's Glastonbury Festival.
Couple mistakenly served bag of cash at McDonald's drive-thru
Exploding whale video goes viral on Internet