Managed by Andoni Iraola, the Madrid-based side who finished 12th in the Spanish top flight last season have former United players Bebe and Radamel Falcao in their ranks.
The match will conclude the Red Devils' pre-season preparations prior to the new Premier League campaign which begins on August 6.
United are set to travel to Thailand and Australia, and then travel to Norway's capital Oslo for a clash against Atletico Madrid, before they finish off at Old Trafford against Vallecano.
"Pre-season is all about preparation and this is a great opportunity for those squad members who may not have featured in some of our earlier Tour," said United's Football Director John Murtough.
"This will be the new manager's first match at Old Trafford, and I am sure the fans will provide him with a warm welcome."
Interestingly, ten per cent of the profits from the match will go to the United foundation.
"We are delighted to be able to offer fans the opportunity to share in the experience of Erik Ten Hag's first match in the dugout at Old Trafford," Manchester United's COO Collette Roche said.
"As well as the chance to see some of the Club's up and coming stars, fans purchasing tickets for this match will also be contributing towards a fantastic cause.
"The club donating ten percent of profits from the game to Manchester United Foundation and its work within the community," she added.
The clash is likely to see the return of both Falcao and Bebe, who previously donned the red shirt of Manchester United.
Both failed to live up to expectations at Old Trafford and were eventually moved on, but they will be hoping to spoil the party in Ten Hag's first home match in what is expected to be a packed house.
Vallecano are in the shadows of both Real and Atletico, but are seen as the third team in Madrid, despite having finished behind Getafe last campaign.
Meanwhile, United finished sixth in the Premier League under interim manager Ralf Rangnick, and missed out on Champions League football.
Ten Hag will be keen to make an instant impact, with the main aim to guide the Red Devils back into the top four.