Murray, who beat Djokovic in an epic US Open final to win his maiden grand slam earlier this year, took the first set against the Serb but was eventually out-fought 4-6, 6-3, 7-5 at the O2 Arena.
It leaves the Scot needing to beat Frenchman Jo-Wilfried Tsonga in his final group match tomorrow in order to guarantee a place in the last four, while Djokovic may also need to beat Czech Tomas Berdych, who defeated Tsonga last night, to be certain of progressing.
An absorbing duel watched by 17,000 spectators was on a knife-edge for much of its two and half hours, until Djokovic broke Murray and then saved two break points while serving for the match.
“The last two minutes of the match is probably what decided it,” said Murray. “He broke from 15-40 and then I had 15-40 next game and didn’t break, so that was the moment that decided the match.”
Victory for Djokovic gave him the edge over his former juniors rival Murray in their seven meetings this year, which have become increasingly captivating and titanic contests.
“I think both of us probably see each other’s games pretty well – especially this year, because we’ve played so much,” Murray added.
“You kind of know a little bit what to expect. I think that’s why all the matches, especially the last few, have been so close and decided by a few points. The intensity of my matches with him has been extremely high this year.
“But the one thing I would say is this year I think both of us probably have seen things in each other’s games improve and that’s why there are a lot of long rallies and the matches are incredibly tight.”
Murray took the initiative with an almost flawless first set and earned an early chance to break in the second at 1-1, but Djokovic rose to the challenge and forced a decider. Momentum swung between the old foes in the final set and Murray came within two points of victory at 5-4, but Djokovic held and then broke at the critical moment in a gritty finale.
“I don’t think I played bad in the first set,” said Djokovic. “It was him playing really well, serving extremely well. He lost only a couple of points on his first serve throughout the whole set, so that says enough about his quality. Then he made some unforced errors.”