Second seed Ljubicic battled his way through by outlasting Swede Robin Soderling 3-6 6-4 7-6.
Davydenko needed medical assistance at the side of the court after injuring his shin when 4-2 up on Murray.
The fourth-seeded Scot took advantage, breaking serve in the eighth and 12th games to snatch the first set.
Davydenko, visibly in discomfort, then had his serve broken three times in the second.
"It was a good win. Not in every tournament do you get the chance to beat the top seed," said Murray.
"He is usually very consistent, he returns well, but today he was not able to reproduce his characteristic form."
Ljubicic, who won titles in Chennai, Vienna and Zagreb in a memorable 2006 season, needed two hours six minutes to defeat Soderling.
The sixth-seeded Swede gained an early advantage in the third and final set, breaking serve in the first game.
The Croat broke back in the 10th game before firing five aces to take the tiebreak 7-5.
He hit 21 aces in all against Soderling's seven.
"I found it difficult to return in the first set. He was very aggressive, I had no answer," Ljubicic told reporters. "In the third I thought he relaxed a bit, may be encouraged by the fact he won the first set easily.
"The lower-ranked players often tend to get tense when they lead against a higher-ranked player. That's what happened to him today and I took full advantage."
Soderling said: "I didn't play well in the second and third sets. Ljubicic served very well and didn't allow me to play to my potential."