Steady building from Hawkins combined with some harsh bad luck on Ding's part as the Australian Goldfields Open champion secured his first-ever participation in the flagship tournament's one-table format.
A break of 45 followed by some solid snooker escapes forced a crucial error from the Chinese star and Hawkins cleaned up for 10-7, having brought a two-frame advantage into the tie from Tuesday.
Hawkins remained on top with 64 followed by 14 to extend the lead to four frames, but when Ding produced a stirring comeback and looked set to steal the 19th frame until a missed final brown combined with the Englishman fluking the final pink:
At that point, it was clear it was not the world number nine's day. And Hawkins doggedly defended a final-frame run to 60 to eventually get the handshake and keep his fairytale run going in Sheffield.
"That was the biggest win for me and I'm just going to enjoy every moment," a delighted Hawkins said after the match.
"It's unbelievable. I'm delighted to make it through to the one-table set-up and I have nothing to lose.
"I didn't sleep great last night and I woke up early this morning due to the nerves, but I managed to take the first frame today and that settled me down.
"I'm pleased with how I held it together at the end and we will see what happens in the next round."
SECOND SESSION REPORT
Barry Hawkins maintained a narrow 9-7 advantage over Ding Junhui after the pair won four frames apiece in the evening session of their World Championship quarter-final clash in Sheffield.
An assured 65 break was enough for Hawkins to win the opening frame of the evening and the Dartford man edged a scrappy second as Ding appeared visibly unhappy on a couple of occasions.
The Chinese was in first with 51 in the next and a superb plant led to another sizeable 76 clearance for his first frame of the evening. Hawkins replied with a 79 to take his third of the evening but Ding recovered from missing a straight blue off its spot to win frame 13.
Hawkins appeared to have done enough to win the next with just blue and pink required but a poor positional shot from the blue and subsequent missed pink cost him dear and Ding had another back.
Two scoring visits proved enough for Hawkins in the session’s penultimate frame but Ding knocked in an unanswered 72 in the decider to leave their quarter final nicely poised.
FIRST SESSION REPORT
Barry Hawkins leads Ding Junhui 5-3 after an undulating opening session of their World Championship quarter-final at Sheffield's Crucible Theatre.
World number 14 Hawkins is 3-1 clear of China's number one in their career head-to-head meetings and is firmly on course for another win as he tries to set up a semi-final with Ricky Walden or Michael White.
Hawkins - a semi-finalist at this year's German Masters - picked up the first frame after an elongated duel before a 55 saw him move two frames clear.
Hawkins has never gone beyond the second round at the Crucible in seven previous meetings, but is a man in form having turned over world number one Mark Selby in the previous round.
Ding finally came to life by winning the next three frames aided by runs of 84, 56 and a couple of modest scoring visits in the third frame.
Hawkins levelled at 3-3 and continued on his merry way with 51 and 70 ensuring him of a two-frame advantage ahead of tonight's second session at 7pm when eight more frames will be played in the best-of-25 frames match.