A Reds team, which could feature the likes of former Falkirk youngster Tony Gallacher, will travel north for the pre-season fixture on Monday July 15.
Spartans chairman Craig Graham told the club’s website: “We are very grateful to Liverpool FC for agreeing to play a part in our celebrations and I am sure it will be an evening to remember for everyone.
“We are very proud of the impact we have had in our north Edinburgh community over the last 10 years and the game will give us the impetus and energy to continue our work.”
Spartans hosted a Manchester United XI in 2011, featuring the likes of Paul Pogba, Jesse Lingard - who netted a hat-trick in the 7-1 win for the Red Devils - while Everton defender Michael Keane scored two after coming on as a sub.
Graham added: “Local people still talk about the game like it was yesterday and I am sure this will be another fantastic occasion.”
Spartans will announce match tickets and hospitality package information in due course. Dougie Samuel’s side face East Kilbride at K-Park on Saturday.