Murray intended only to practice as he recovers from a hip problem but agreed to replace Djokovic after the Serb withdrew due to an elbow injury.
The Briton lost the first four games against Spain’s Roberto Bautista Agut before he was able to hold his serve.
Murray looked better as the match went on, saving three match points before Bautista Agut registered a 6-2 win.
The British number one was forced to end his 2017 season early because of his hip trouble and has not played competitively since Wimbledon.
“When you haven’t competed for a long time it takes time to get back up to that pace. I started to feel a bit better at the end,” Murray, 30, told Eurosport.
“I’ll need to keep improving, for sure. It was good fun. I’ve missed it.”
Murray travelled to the airport after the match for a flight to Australia on Friday evening, where he is scheduled to appear at the Brisbane International.
The tournament is intended to act as part of Murray’s warm-up for the Australian Open, which begins in January. (Courtesy BBC)