Trump, champion in 2011 and 2024 and runner-up to Mark Selby last year, finished with a break of 93 and meets O'Sullivan, the eight-time winner, at 14:00 CET on Friday.
O'Connor, the world number 32 who beat 12th seed Chris Wakelin in a decider in the first round, took the opening frame with a 98, missing the black that would have brought up his century.
Trump answered with runs of 66, 87 and 74 as he won four frames in a row, a spell in which O'Connor scored only 65 points.
A 101 from O'Connor in the sixth frame made it 4-2, but Trump took the next two to go through.
"Joe started off like a train and put me under pressure and after that you are battling to get a lead, it was a tough game," said Trump.
"It should be a good game and it's nice to see him playing well," he added of O'Sullivan. "It's always a good game against him and even more special at events like this."
Wu downs Ding
Wu came from 5-4 down to beat Ding 6-5, his second deciding-frame win of the week after his first-round victory over Michael Holt.
Ding opened with a 52 before breaks of 70, 61 and 59 helped Wu into a 3-2 lead, and the three-time champion then made 133 and 91 in successive frames to go back in front.
Needing one more frame at 5-4, Ding did not get it. Wu levelled with a 107 and made 77 in the decider.
His quarter-final against Murphy, at 20:00 CET on Friday, is a repeat of May's World Championship final, which Wu won 18-17.
World number one Zhao Xintong plays Zhang Anda and Mark Allen meets John Higgins in Thursday's evening session, with Mark Williams and Chang Bingyu already through to the other quarter-final.
