It was Djokovic who struck first, breaking for a 3-1 lead in the first set and, although Murray hit straight back, another break gave him a 4-2 advantage and he kept a level head to serve it out.
The momentum remained with the Serbian as he moved 2-0 up in the second with Murray still struggling to find any kind of rhythm.
But having levelled at 2-2 his game suddenly returned.
He broke again for 4-2 and there was now a crispness to his groundstrokes hitherto lacking.
On the other side of the net, Djokovic was showing the signs of a man struggling. His body language indicated he had a physical problem with his frequent looks to his worried camp suggesting he was in trouble.
The Serbian is a warrior though and he battled through the pain to break back only for Murray to reclaim the upper hand straight away.
Djokovic did his utmost to level once more with Murray serving for the set but the Scot held his nerve to level it.
If the first two sets were attritional the third, all 88 minutes of it, was simply punishing, especially in the latter stages.
Murray staved off three set points at 4-5 with some gutsy play. He saved the first with an ace, the second with a crushing forehand winner and the third with a drop shot-clipped backhand combination.
Sensing he had got out of jail, Murray then struck for 6-5, claiming his second break point chance after some outstanding defence.
But, not for the first time in his career, Murray seemed crippled by nerves at a crucial juncture and a string of errors allowed Djokovic to level and take it to a tie-break.
The momentum had seemed to swing back towards Djokovic but Murray played a solid breaker to win it 7-4 and edge two-sets-to-one ahead.
After what had gone before, the fourth was totally unexpected, the defending champion romping through it in just 25 minutes, breaking three times en route with Murray offering very little resistance.
The earlier signs of fatigue and distress from Djokovic had now disappeared and he made a strong start to the final set.
Murray was also looking like he had regained his composure after the fourth-set horror show although he had to stave off three break points at 1-2, some big serving getting him out of trouble.
But he could not repeat the feat when Djokovic threatened again, the Serbian moving 4-2 ahead after crushing a mid-court forehand on his second break point.
Murray forced his opponent to serve it out and it proved a crucial moment as Djokovic faltered, his serve deserting him at a critical time.
The Scot completed his comeback from 5-2 down to 5-5 with a cool hold.
And he almost broke again only for three break points to come and go - the second a 29-shot rally ended with a crushing forehand from Djokovic.
It was to prove his final opportunity as Djokovic then broke to clinch an extraordinary match in four hours and 50 minutes and set up a title decider with Rafael Nadal on Sunday night.
“I am delighted to reach the final and what can be a bigger challenge than playing Rafael Nadal, who has been playing so well on this court,” he said.
“We have a lot of respect for each other but I am going to try to recover.
“It is going to be physical so I need to do some push-ups tonight.”