The two Manchester sides will meet at the Bird's Nest Stadium in Beijing on Monday, 25 July as part of the pre-season International Champions Cup.
Guardiola is replacing City boss Manuel Pellegrini in the summer.
Surprise Premier League leaders Leicester will play Barcelona and Paris St-Germain as they make their debut in the invitational tournament.
The Foxes will play Celtic in Glasgow on 23 July, PSG in Los Angeles on 30 July and Barcelona in Stockholm on 3 August.
United's pre-season tour will be much shorter than in recent years.
At manager Louis van Gaal's insistence, the club will only be spending eight days in China, and play just two games.
The first of these will be against German side Borussia Dortmund, who face Liverpool in the Europa League quarter-finals next month, in Shanghai on Friday, 22 July.
Guardiola could meet old foe Jose Mourinho, who has had talks with United about taking over from Van Gaal.
The Premier League season will start later this year - on Saturday, 13 August.

The tram, which currently serves the Nottingham area, would also run to East Midlands Airport and the proposed HS2 station at Toton.
The 19 councils in the region described the scheme as one of several "priority projects" in devolution negotiations.
The timetable and costs of the project are not discussed in the document.
The information was revealed in a document detailing requests to be made from the government as part of a deal to devolve power.
Andrew Braddock, chairman of the Light Rail Transit Association, which supports the project, said the trams would be an efficient and effective way of moving passengers from the HS2 station to the cities of Derby and Nottingham.
Updates on this story and more from Derbyshire
He said: "I am not surprised by the move… as they start to look at it… they will realise that creating an East Midlands light metro network… is a good idea.
"There have been a rash of modern new tramways across France as city mayors say... it's time we took the streets back for the people.
"In Germany, they've had trams since the 1880s and were sensible and kept them."
A transport review in 2013 estimated the cost of a new tram line at £20m for each mile of track, putting the cost of a link from Toton to Derby at about £200m.
Another cost estimate for a tram line from Nottingham to Ripley in Derbyshire via Eastwood, Kimberley and Langley Mill was put at £180m.
The document said the East Midlands councils are determined to "reach a unified position on the strategic transport interventions required to maximise the growth potential of the region".
Other projects backed by the local enterprise partnership include:
You also can read more about this story on our Nottinghamshire live page.
Pep Guardiola will face rivals Manchester United in one of his first games as Manchester City manager.
[NEXT_CONCEPT]
A multi-million pound project to extend the Nottingham tram system to Derby is being treated as a "priority", the BBC has learned.