The Mexico striker, who only linked up with the squad this week, became an instant hit with the fans when he scored in the 84th minute.
It was fine finish as well, a lob over the goalkeeper following a throughball from Darren Fletcher.
Manager Sir Alex Ferguson led the applause and he had much to enjoy from his inexperienced side.
Federico Macheda scored a brace with the side giving a superb exhibition of free-flowing football.
The 18-year-old striker made the breakthrough after just 24 seconds in front of an astonishing crowd of 70,728 - a record attendance for a soccer match at the Reliant Stadium.
He added a second in the 12th minute and although the All-Stars pulled a goal back through Brian Ching, United re-gained the momentum. Substitutes Darron Gibson and substitute Tom Cleverley also found the target.
United got off to a lightning quick start with Macheda slotting the ball into the corner following a dreadful error by Kevin Alston, who played the ball into the Italian's path.
Macheda took full advantage and swept his effort beyond stranded goalkeeper Donovan Ricketts.
United stretched their lead in the 12th minute with the All-Stars again guilty of poor defending and Macheda got his second of the game.
He was left unmarked as Nani swung in a corner and flicked a header into the net.
However the All-Stars almost pulled a goal back from a set-piece in the 15th minute, Edwin van der Sar doing well to tip over a free-kick from former Aston Villa striker Juan Pablo Angel.
The All-Stars were beginning to settle into the match and Marco Pappa saw his effort beaten away by Van der Sar in the 29th minute.
United, however looked dangerous every time they went forward and Fletcher almost made it 3-0 in the 40th minute, his shot coming back off the bar.
Hernandez was introduced in the 62nd minute when he got a rousing reception given nearly a million Mexicans live in the Houston area.
A minute later the All-Stars pulled a goal back when Ching scored with a near post header.
Hernandez settled quickly and tested substitute goalkeeper Nick Rimando with a shot he did well to parry.
The new recruit then had a hand in United's third goal in the 70th minute. He was hauled back by Wilman Conde which earned the defender a booking.
Gibson stepped up for the free-kick and delivered a stunning free-kick over the wall and into the corner.
That was followed three minutes by an equally superb finish from Cleverley. He latched on to a chip from Fletcher, clipped the ball over Conde and found the net.
Hernandez then had his moment before Dwayne De Rosario got a second for the All-Stars in the final minute.