The nighttime chat show is usually taped in Los Angeles, but next Monday through Thursday's episodes will be broadcast from Central Hall Westminster in London.
McCartney will be seen giving his fellow Briton Corden a tour of his hometown of Liverpool as they sing some of the former Beatle's hits in the pre-recorded video.
CBS did not indicate on which night McCartney's segment would run, but Corden certainly seemed excited about it.
"I can't wait for you all to see this. It was a day that will live with me forever," the comedian tweeted Thursday along with a photo of him hugging McCartney in front of a car.
The shows will also include a sketch starring Jurassic World and Guardians of the Galaxy actor Chris Pratt, and appearances by guests Damian Lewis, J.J. Abrams, Ruth Wilson, Cher, Cate Blanchett, Orlando Bloom, Niall Horan and Foo Fighters.
"Members of the England Football Team will join James for a special sketch to celebrate the start of the World Cup. The London-based shows will also feature a new Crosswalk the Musical with famed musical theater composer Andrew Lloyd Webber, Spill Your Guts with Cher, plus James gets a job at The Savoy in Take a Break," a news release said, adding the episodes will air on CBS in the United States and on Sky in the United Kingdom.