The Wimbledon champion looked way off the pace against unknown Austrian Dominic Thiem, labouring badly and looking nothing like a two-times grand slam winner.
Thiem, 20, was clearly on the receiving end of fortune as his carefree, hit-everything approach lasted throughout the whole match – a rare occurrence.
But Murray could not find a way to break the world No 113, and showed plenty of frustration before he ground out a 6-4, 3-6, 6-3 win.
It had looked as though it would be easy for Murray, with the Scot breaking in the first and third games to take early control. The signs of trouble became evident quickly, though, and after seeing off a break point he coughed up his serve with a wayward forehand.
He would take the set 6-4 but the second must rank as one of the worst Murray has played for some time.
He was never able to dominate his opponent and, on his only chance to break in the fifth game, broke a string on the vital point. He was broken in the eighth game with another poor forehand costing him, and Thiem made him pay with a routine hold.
Murray continued to labour in the third set and endured a frustrating second game as he repeatedly failed to put Thiem away. He smashed his racket into his shoe at one stage, before eventually getting the break he craved and going on to see it out.
Murray next faces Marin Cilic.
Elsewhere, top seed Juan Martin del Potro made comfortable progress through to the quarter-finals. The Argentinian saw off Frenchman Paul-Henri Mathieu 6-2, 7-6 (7/2) to tee-up a clash today with Ernests Gulbis.
The Latvian also played yesterday and beat the No 8 seed, Grigor Dimitrov, 6-4, 7-6 (7/3).
Third seed Tomas Berdych impressed as he dropped only seven games while beating Nicolas Mahut. And there was a shock as fourth-ranked Richard Gasquet was dismissed by Philipp Kohlschreiber, losing 7-5, 7-5, while sixth-rated Tommy Haas was sent packing 6-4, 6-4 by Jerzy Janowicz.
On the women’s circuit, top seed Li Na crashed out of the Qatar Total Open at the hands of qualifier Petra Cetkovska of the Czech Republic.
Li, who will move to a career-high second in the world rankings next week following her Australian Open triumph, lost 6-7 (2/7), 6-2, 4-6 in a third-round match lasting two hours and 46 minutes.
Both players committed five double faults and lost their serve twice in a nervy first set which Cetkovska eventually won on the tie-break, before Li hit back to level the match courtesy of two breaks of serve in the second set.
The top seed would have been expected to go and claim victory in the decider but lost her serve three more times as Cetkovska, ranked 134th in the world, claimed a famous win.
There were no such worries for fifth seed Jelena Jankovic, who saw off wild card Alisa Kleybanova 6-1, 6-2 in 72 minutes.
Fourth seed Sara Errani had to come from a set down to reach the quarter-finals, the Italian beating Romania’s Monica Niculescu 2-6, 7-5, 6-1, while third seed Petra Kvitova was also pushed all the way by fellow Czech player Lucie Safarova.
Kvitova took the first set on a tie-break before Safarova hit back to level the match, former Wimbledon champion Kvitova then claiming the decider to seal a 7-6 (7/2), 5-7, 6-2 success.