After losing the first frame to a lovely run of 71 by world number one Selby, O'Sullivan picked up where he left off from the first four rounds as the five-times world champion won the next five frames in under an hour with breaks of 93, 57, 61, 75 and a 132 that resembled a practice session.
Selby enjoyed a knock of 63 in frame three, but even that was not enough as the Essex player - who completed a 6-3 win over Selby on the way to winning last month's Masters for a sixth time - returned to pinch it on the black.
In another high-quality quarter-final between two former Masters champions in Ding and Robertson, Australia's 2010 world champion Robertson showed his class after watching Ding restore parity at 1-1 with a lovely contribution of 120.
Breaks of 140, 72 and 44 left Robertson on the cusp of the last four before Ding stemmed the tide with a magical of run of 147, a knock that should secure him £10,000 and another £2,000 for the highest break.
It was the sixth maximum of his career and the 117th in competitive snooker since Steve Davis recorded the first televised 147 against John Spencer at the Lada Classic in 1982. Only O’Sullivan with 13, Stephen Hendry on 11 and John Higgins with seven have made more than China's leading player.
As if to illustrate the sport's rising standards, 65 of those have been made in the past decade. Ding watched O'Sullivan roll in a 147 of his own in losing the Welsh Open final to the Englishman two years ago.
Ding Junhui makes brilliant 147 at Welsh Open
Ding would have been forced to share his £12,000 with O'Sullivan if he had not somewhat controversially decided to make a 146 against Barry Pinches in Monday's first round because he was not content with the prize on offer for snooker's maximum break.
“I had the feeling all week it might happen, after Ronnie made the 146 and with so many good players left in the draw," said Robertson, who made his third maximum in winning the UK Championship in York in December. "Ding’s positional play was beautiful - there were a few tense moments on the colours but he held himself together really well. It was a fantastic break.
"The excitement and the tension in the arena is something very special so I’m happy for the fans and for the tournament that they did get to see it.”
Ronnie O'Sullivan continued his impressive form - pic via World Snooker.
Image credit: Eurosport
As it was, Ding - who may have to qualify for the World Championship at Sheffield's Crucible Theatre in April after reaching only two quarter-finals in ranking events this season - could do nothing to prevent Robertson from sealing his progress as the Melbournian dominated the seventh frame to secure a meeting with Mark Allen over the best of 11 frames in Saturday's first semi-final. Allen commanded a one-sided semi-final in completing a 5-0 win over Michael White.
O'Sullivan finishes in style to reach last four
Robertson is seeking a third title in four months after lifting the Champion of Champions and UK Championship before the New Year.
But O'Sullivan - chasing a fourth Welsh Open to accompany his successes in 2004, 2005 and 2014 - is hitting the ball as well as ever since turning professional in 1992. He will meet Joe Perry on Saturday night after his 5-1 win over Ben Woollaston.
“I just went out there and went for my shots. I’ve got a chance (of the title), it would be ridiculous to say otherwise, but Neil Robertson is the all round professional now," said O'Sullivan. "He’s like Steve Davis was in the eighties and Hendry was in the nineties: very disciplined and wanting to set a benchmark as far as his legacy.
"You’ve got to play out of your skin to beat him.”
Friday 19 February (best of nine frames)
Ding Junhui (Chn) 2-5 Neil Robertson (Aus)
Mark Selby (Eng) 1-5 Ronnie O'Sullivan (Eng)
Joe Perry (Eng) 5-1 Ben Woollaston (Eng)
Michael White (Wal) 0-5 Mark Allen (NI)
Saturday 20 February
Semi-finals (Best of 11 frames)
N Robertson (Aus) v M Allen (NI)
R O'Sullivan (Eng) v J Perry (Eng)