The often-criticised defender started and played a full game in the win over the Hammers thanks to Marcus Rashford’s first-half header from Christian Eriksen’s cross.
Maguire hadnt played since injuring his thigh on international duty with England last month, before returning as a substitute in midweek in the Europa League.
Ten Hag brought him back into the United starting line-up to face the Hammers and was pleased with his return.
“It was a good performance,” the Dutchman told reporters. “It is not easy when you are a couple of weeks out and he only played 45 minutes on Thursday, but Premier League is a different level.
“Then to come in and to get under such pressure, especially at the end of the game, when it’s tough. And we didn’t have the opportunity to substitute because we didn’t have any more centre-halves on the bench. Then we survive.
“He was magnificent in protecting the box. He’s a great player, a really good defender and we have seen that and how important he is for the squad.
“I think he showed good attitude, I think he showed good resilience, I think he showed a bit of confidence and that’s good to see.”
Ten Hag also responded to Manchester City boss Pep Guardiola’s comment that United are “finally coming back” following their positive run of form.
The Red Devils are up to fifth on the Premier League table with 23 points from 12 games, having lost once in their past 10 league games, beating Liverpool, Arsenal and Tottenham along the way.
“I think its a little bit too quick,” Ten Hag said about declaring United are back. “Second half, I have to be critical, I also said the players, we have to manage things better.
“But the spirit we have is fabulous, also we have the qualities to score goals and we have attacking football and the fact is we have to improve that, but if we keep going, I think we are in the right direction.
“But to be a threat for them, then we have a long way to go.”