In a repeat of the 2012 final, which Murray won, the pair combined for some stunning long rallies before Djokovic pulled away for a 7-6 (1) 6-7 6-2 6-4 victory to set up a semi-final against Kei Nishikori of Japan.
“I think we played a very physical match in the first two hours,” Djokovic said. “I am very glad to get through to another semi-final.
“We both gave our best. At times, the tennis was not that nice, we made a lot of unforced errors but that’s due to a very physical battle we had in the first two sets.
“I knew coming into the match that he was going to go for his shots and the one who was the most aggressive would win. I am glad I managed to stay fit in the end and pull through.”
Murray ended the match struggling a little with his movement and required a hot compress for his back midway through the fourth set.
But he produced arguably his best tennis since having back surgery 11 months ago and gave the top seed a real scare.
In the end, the Scot was left to rue a series of missed break point chances, taking just four of 16 in all, while Djokovic was successful on seven out of 10.
In their 21st meeting, Djokovic dropped serve in the opening game but surged ahead 4-1 only for Murray to hit back, prompting the Serb to smash his racket on his chair at the change of ends.
He regained his focus to take the tiebreak 7-1 and when he led 3-1 in the second set, he looked as if he would run away with the match.
But Murray suddenly began cracking forehands with huge powerand he recovered to force another tiebreak, also winning it 7-1.
The start of the third set proved crucial as Djokovic broke again for 3-1 but this time held his advantage to move ahead.
Although Murray hung in well for much of the fourth set, despite a sore back, Djokovic broke in the 10th game to advance to the last four.
(Editing by Patrick Johnston / Ian Ransom)