The singer will perform at the venue on May 23, with an additional show on May 24, reported Digital Spy.
The UK leg of McCartney's Out There tour also includes shows in Birmingham on May 27 and Liverpool on May 28.
Announcing the tour, he said, "I'm looking forward to taking the Out There tour back to Europe this summer. It's been a little while since I've performed in some of these places, so we know it's going to be a fun tour.
McCartney's first show at The O2 in London on May 23 falls on the 50th anniversary of him completing The Beatles' hit single 'Yesterday'.