Two sets up and 1-1 in the third, Wimbledon champion Murray looked poised to coast to another easy win at Melbourne Park but was reduced to a spectator as the Frenchman charged into a 5-1 lead with a barrage of sweetly-struck winners under the lights at Rod Laver Arena.
Surprised but not rattled, the Scot steeled himself to save a set point before mounting an extraordinary counter-attack that ended with a booming serve and left him punching the air and yelling triumphantly.
"I was up 6-2, 6-2. Then out of nowhere he started playing unbelievable," Murray told reporters. "Sometimes you need to remind yourself that it's going to be hard for him to keep that up - it's low-percentage tennis.
"That's what I was trying to remind myself when I was 5-1 down. If I can just hang in and sort of weather the storm a little bit I might be able to come back.
"It was 6-5 when I went to serve for it and someone shouted out, 'you won 19 in a row'. I would say that's probably the most I've ever won in my career by far," said Murray.
"It's very difficult to do. I don't really know how I did it."
After successfully negotiating his fourth match since a long layoff from back surgery, the fourth seed will play Feliciano Lopez of Spain for a place in the fourth round.
The first-round retirement of American 13th seed John Isner and the late withdrawal of 21st-seeded German Philipp Kohlschreiber has left the draw wide open for the 26-year-old Murray who has lost three previous finals at Melbourne Park.
Improbably, Murray faces the prospect of a fourth-round clash with one of two lucky losers in French journeyman Stephane Robert, a 33-year-old ranked 119th, and 106th-ranked Slovak Martin Klizan.
"I feel much better than I did two weeks ago and every day hopefully I'll feel better and better," said Murray who, barring his brief stumble, was a model of controlled aggression in the two-hour match played out in muggy conditions.
"My body's not in a lot of pain right now. I'm not stiff and sore which is a good sign. Hopefully I wake up and feel fine again tomorrow.
"But it's all a process for me. I've never experienced this before. I'll try and deal with it as best I can. But I have a lot of positives for me so far.
"Hope I'll keep getting better," said Murray.