Higgins, the runner-up in each of the last three years, trailed world number 43 Maflin overnight and was 7-4 down when he fired the first 147 of his glittering Crucible career.
But despite going on to nudge into an 11-10 lead, the veteran Scot was hauled back by an inspired Maflin who reeled off three straight frames to claim by far the biggest win of his career.
Maflin told Eurosport: "When I went 11-10 down I just thought 'it feels like I'm going here, I need to do something'.
"I thought back to all the practice I've been doing and that's what got me through. I went for my shots and they went in.
"I just gave it everything I could tonight. I started off well but he makes it so tough. He's so hard to beat, you can never get rid of him."
Maflin had won two consecutive frames in the morning before four-time champion Higgins hit back in the final frame before the mid-session interval with his sparkling maximum, the first achieved at the Sheffield venue since Stephen Hendry in 2012.
It was the 10th 147 Higgins had made in his career and in the next frame he made the most of a missed red by Maflin on a 57 break to close the gap to one.
Norway-based Maflin, who has lost in qualifying in 15 of the previous 16 years, made no such mistake next time with a break of 81 to regain his two-frame lead before Higgins finished an excellent session in style.
He won the final two frames, the latter after his opponent could not close out a 52 break, to draw level at 8-8 at the end of the morning session.
Maflin seized the initiative when play resumed in the evening, winning two consecutive frames to move 10-8 in front, but an under-hit red to the middle let in Higgins to clear with a break of 78 then take the next two frames to move ahead.
But just when it looked like Higgins would move on to seal his place in the last eight, a simple missed brown in the next ultimately allowed Maflin to clear and pull level again.
Another Higgins mistake saw Maflin pounce with a break of 80 to move within one frame of victory, and a break of 63 in the next frame proved enough to nudge him over the line.
Defending champion Judd Trump trails 5-3 after the opening session of his second round match against China's Yan Bingtao.
The impressive Yan produced a 133 total clearance plus two more breaks above 90 to impress against the out-of-sorts Trump, who edged the final frame of the day to reduce the deficit.
Former world champions Mark Williams and Stuart Bingham will head into tomorrow's concluding session of their second round match locked together at 8-8, as will Mark Selby and Thai qualifier Noppon Saengkham.