A Magpies team including Alan Shearer, Les Ferdinand, Rob Lee and Faustino Asprilla will line up against an AC Milan Glorie side boasting Franco Baresi, Paolo Maldini, Alessandro Costacurta and Andriy Shevchenko.
The proceeds will go to the Great North Children's Hospital, the Sir Bobby Robson Foundation and the Newcastle United Foundation.
Harper, who made his 199th and final appearance for Newcastle against Arsenal on the final day of last season, said: "This match is a massive honour for me.
"I had a fantastic send-off against Arsenal at the end of last season, so this is really my opportunity to say thank you to a region which has given me so much support and to use my time to raise as much money as possible for three incredible causes.
"To have some of the best players to have ever worn the black and white shirt back at St James' Park alongside some of the greatest names from Milan is fantastic, and with every penny raised going to three important north-east charities, I hope as many people as possible can come along and enjoy it."
Baresi, who will captain the Italian side, added: "I would like to firstly congratulate Mr Steve Harper on his 20 years with Newcastle United.
"I was very happy to hear of the possibility of AC Milan Glorie travelling and playing against a Newcastle United legends team at such a famous stadium.
"I know the passion of Newcastle fans and I know of the club's history and the love of football in the city, so I congratulate Steve and wish the fans and Newcastle United a magnificent occasion."