Melzer was leading 6-3 2-1 when Monfils called it quits, saying he was unable to continue because of a painful left hip.
"He's such a great player, so I was trying to focus on my things that I've been doing well this week," said Melzer.
"I was trying to be aggressive and go to the net as much as I could.
"The game before he retired he was serving really slowly and I missed a lot of returns because I knew if I broke him it could be the end and you get a little tight."
Monfils has been plagued by injuries all year and needed medical treatment for a strained left abdomen during his semi-final the previous day.
"After about 50 minutes, I tried to serve at full speed, and that was it," said the former world number seven.
"I felt like something snapped a little bit and it was really painful. It was tough to continue.
"I will try to get an x-ray tonight and see what's going on."
Melzer's victory provided him with his fifth ATP career title and his first since he won at Memphis last year but he sympathised with Monfils.
"Nobody wants to win a final like that," said Melzer. "You want to be out there competing but at the end of the day you take the title."
The win also provided the 32-year-old with a timely confidence boost ahead of the U.S. Open, starting on Monday, and vindicated his decision to hire Galo Blanco as his new coach.
"He started working with me in a tough moment of my career," Melzer said.
"I hadn't played any matches after Wimbledon. I took four weeks off with a shoulder issue and I played terrible in Cincinnati....to come back a week later and win a trophy (is great)."