The England striker was introduced after 58 minutes at London Stadium and created the opening goal five minutes later, wriggling free down the left flank before pulling the ball back for fellow substitute Juan Mata to score.
Zlatan Ibrahimovic added a late second for United against a West Ham side reduced to 10 men after just 15 minutes following Mike Dean’s decision to send off Sofiane Feghouli for a challenge on Phil Jones.
Asked what message Mourinho had given him before he went on, Rashford said:
“He just told me to stay wide and try to isolate the full-back and we did in the end. I’m just following orders, of course!
“I’m very pleased with the three points.
“We’re in and around the top four. It’s very tight between sixth and second so we have to take it game by game and try to win every game.”
The win moved United within a point of fourth-placed Arsenal, who play Bournemouth on Tuesday.
“We needed to win. We knew about the results from our rivals so we needed to get the three points” Juan Mata added.
“It started to feel like one of those nights. Marcus did a great job on the wing and I just tried to put the ball in the back of the net.
“[Mourinho told me] just try to score, try to create something. There were some spaces in between the defenders and I just tried to create some chances. With the help of everyone, we won and we continue on this run of results.”
Mourinho was pleased his substitutions had paid dividends, with his team starting to look frustrated at their inability to break West Ham down.
“These fixtures are very difficult for everyone but I managed to calm the team and tell some key players in the second half to do exactly what I want.
“I was happy with my choices in the second half, with Mata and Rashford, because they gave us what we needed.
“In the past two matches, Rashford was absolutely crucial to us. I know that they [West Ham] don’t have another right-back on the bench and I felt that Marcus could finish the job for us.”
Mourinho believes the 19-year-old has what it takes to become a major player for United in the years to come.
“It’s a bit of everything but he’s the one who is responsible. He is very professional, very mature. For sure people in the academy and Mr [Louis] Van Gaal had a contribution to his formation, which we’ll try to end in the next couple of years.
“He’s a Manchester United player with Manchester United DNA and with Manchester United quality.”