Milton was 5-of-12 passing for 89 yards and no touchdowns when he was replaced, and McNamara instantly gave Michigan (2-3) a spark on offense.
"He was outstanding. Really gritty, really gritty performance in all ways," Harbaugh said of the redshirt freshman. "Super job executing, was outstanding. His play was inspiring, so yeah, can't say enough great things. So proud of him."
McNamara entered the game in the second quarter and led Michigan to a touchdown in his first drive then got the Wolverines into field goal position before the end of the first half. Kicker Quinn Nordin missed the attempt, but the team made up for the missed opportunity when wide receiver Giles Jackson returned a kickoff for a touchdown to open the second half.
Milton, a redshirt sophomore, started the game after Harbaugh had said he would open up the quarterback competition following Michigan's 49-11 loss to Wisconsin. Harbaugh acknowledged, however, that bringing in McNamara gave the team some confidence and the spark it needed to come back and win Saturday's game.
"It was great to see our players having fun," Harbaugh said. "Saw so many good things out of him, the way he played, the way he executed, how he was prepared for the game. Gritty, it was a gritty performance, but also really great quarterback play."
McNamara finished 27-of-36 for 260 yards and four touchdowns with zero interceptions and also rushed for a score. He is only the fourth quarterback in school history with four touchdowns passing and one rushing in a game, joining Devin Gardner, Denard Robinson and Steve Smith.
The play at quarterback was a bright spot in the game, but the defense continued to struggle. In the five games in the series before this one, Michigan had given up 37 combined points to Rutgers (1-4) compared with 42 in Saturday's game alone.
The Wolverines' defense has given up 137 points on the season, the most through five games in team history.
But given that Michigan entered on a three-game skid, getting a victory and finishing a game was the team's priority.
"This win meant everything," linebacker Josh Ross said. "Our goal coming into this week was just to be 1-0, and we achieved that. We had a great week of preparation, and although we gave up a lot of points on defense, we still came out with the win and we fought our butt off the whole game, all the way to the end."
Harbaugh has said throughout the season that he has wanted to see his players trust themselves, trust their talent and play freely the way he knows they are capable of playing. He said he saw that on Saturday, and while they acknowledged it wasn't perfect, the Wolverines are taking the win as a positive and aim to use it as a foundation moving forward.
"That game could've gone either way -- I felt both teams played their hearts out, made plays," Harbaugh said. "Guys were having at it. I was happy to see our guys making the plays, having fun, playing their hearts out. That's been gut-wrenching not to see our guys having fun.
"Tonight they did, and we were able to get the victory. It will be a happy flight home."