The Swiss lifted the trophy on Sunday thanks to a hard-fought 7-6(6) 7-6(2) victory over the Frenchman.
The 33-year-old is now up to second place in the ATP rankings, and has a chance of finishing the year above Novak Djokovic at the top of the standings.
"To win the biggest tournament in Asia is a treat," Federer is quoted as saying by BBC Sport. "I got lucky to come through the first round after saving five match points. It's been a dream week."
Federer reached the final of the 2010 Shanghai Masters before losing to Andy Murray.