Chinese star Ding opened with runs of 101 and 133, without reply, as 22-year-old Scot McGill appeared overawed.
The world number nine dug in to win a frame back only to go 3-1 behind thanks to a Ding break of 54.
McGill, who lost 4-2 to Ding in final of the Scottish Open PTC event this season, was not finished there, though, as his opponent failed to put the match to bed.
After cutting the deficit to 3-2 he seemed down and out in frame six, only to regain his concentration and produce an excellent clearance to the pink to level the match.
But just as it seemed McGill could pull off a remarkable win from behind, Ding found his touch once more. McGill never got a chance in the decider as five-times ranking tournament winner Ding's class shone through with a 130 to win the match - a break that would have been a 143 clearance had he not missed a tricky pink.
Ding will play Mark Allen in the quarter-finals after the Ulsterman whitewashed Joe Swail on Thursday.
2010 world champion Neil Robertson beat Barry Hawkins 4-1 in the second match of the day.
The Australian will play Xiao Guodong, who brought Alfie Burden's run at the tournament to an end with a 4-2 win in a late match that did not finish until 1:15am.
It is the second year in a row that the Chinese has reached the last eight.
"I just concentrated hard because every ball is important," said Xiao. "I like this venue and I enjoy coming to Galway because I have a Chinese friend here."
Marco Fu booked his place in the quarter-finals with a 4-1 win over a frustrated Ali Carter.
Carter let his temper get the better of him towards the end of the match, allowing Fu to exact revenge for the 9-6 defeat he suffered to Carter in the final of last month's German Masters.
"I think I'm starting to win matches when I'm not playing well," said Fu. "I've seen great players in the past who win tournaments when they are only at 50 or 60 per cent, and hopefully I can do that this week.
"I'm more relaxed than usual because I haven't been practising that much, so I haven't been expecting much of myself going into tournaments. I'm just trying to enjoy every match. I'm not on top of my game but I'm winning matches which is the most important thing.
Fu now meets Tom Ford for a place in the last four.
Rounding off the day's action in Ireland, Kurt Maflin will meet Ben Woollaston both maintained their good form this week with respective victories.
Maflin registered a tight 4-3 win over Rod Lawler while Woollaston downed Joe Perry by the same scoreline. It is the further either player has been in a main ranking event.
Marco Fu 4-1 Ali Carter
Ding Junhui 4-3 Anthony McGill
Neil Robertson 4-1 Barry Hawkins
Xiao Guodong 4-2 Alfie Burden
Ben Woollaston 4-3 Joe Perry
Kurt Maflin 4-3 Rod Lawler
Tom Ford v Marco Fu
Ding Junhui v Mark Allen
Neil Robertson v Xiao Guodong
Ben Woollaston v Kurt Maflin
- Sports & Recreation
- Neil Robertson
- Xiao Guodong