In another entertaining struggle between the two U.S. Open finalists, Djokovic seemed headed for defeat when Murray was serving for the match at 5-4 in the second set, but saved one match point in that game before breaking back for 5-5. [break]
He then saved four more in a tense tiebreaker and carried his momentum into the deciding set, breaking the Briton twice to earn his fifth title of the year.
It was Murray´s first loss in Shanghai in 13 matches.

Novak Djokovic of Serbia, left, and Andy Murray of Britain, right, shake hands after their men´s singles match at the Shanghai Masters tennis tournament at Qizhong Forest Sports City Tennis Center in Shanghai. (AP)
Murray, who beat Djokovic in five sets at Flushing Meadows for his first Grand Slam title, saved two match points in the final game, but sent a backhand long on the third.
In a matchup of two of the game´s best returners, both players struggled to hold serve early, trading breaks three times en route to 4-4 in the first set.
When Djokovic was broken for the fourth time in the 11th game, he lost his cool and shattered his racket by smashing it into the ground four times before slinging it disgustedly toward his sideline chair.
But the momentum seemed to shift with one audacious shot from the second-ranked Serb, just as Murray thought he was closing in on his third straight title at the tournament.
Trailing 5-4 and 30-0 in the second set, Djokovic chased down a lob from Murray and hit a perfect between-the-legs shot to return the ball, then followed it up with a drop shot to win the point. He went on to save Murray´s first match point with a forehand, and broke back when the Briton missed a forehand of his own two points later.
In the 20-minute tiebreaker, Djokovic finally prevailed when he converted his fourth set point with a forehand winner.
Murray couldn´t recover, and Djokovic broke for a 4-3 lead before winning the next two games as well to wrap up the win.
Djokovic rallies to beat Murray in Shanghai final