Trump led 3-0, 4-1 and 5-2 at the York Barbican Centre, but appeared to pay the price for losing concentration as the unheralded Walsall player Joyce mounted a marvellous recovery.
A composed 49 in the final frame was enough to help Joyce progress against the tournament favourite, who appeared in a state of disbelief after looking seemingly untouchable in the early moments of an undulating afternoon.
Trump played on for snookers in the final frame before Joyce finally potted the green he needed for victory. Trump had chances of his own in the decider, but broke down on 37 as he saw a yellow struggle out to a middle bag.
Trump even found time to use Twitter while leading 3-1 at the mid-session interval. "Might go for a few now, feeling relaxed. Not playing great," he said, apparently unaware that he was living on borrowed time in snooker's second biggest ranking event behind the World Championship.
Joyce beat Trump 9-7 two years ago in the last 16 of the UK, but this win is a lot more significant with his opponent reaching a world final and rising to the top of the game over the past two years. It was a huge contrast from his 10-8 win over Mark Allen in last year's final.
"I had a chance at 5-2 and I had a kick and from then on nothing went right and I just didn't play well," said Trump.
"I felt like I was going to play well, but he then he dragged me down at the start. It's disappointing to play that badly but fair play to Mark, he had to come from behind."
Joyce is recovering personal ground having been the victim of a mugging, but he has displayed real fortitude in handling the physical and mental scars of the incident to rebuild his snooker career.
"I'm over the moon, it wasn't a vintage performance by any means but it's the hardest game in the world when you're under pressure... I'm still shaking now to be honest," said Joyce.
"To my mind my world ranking's a false one. After I had a good run in this event a couple of years ago, I got attacked during a night out and ended up with a fractured elbow. It cost me four months physically, but mentally it probably cost me a lot longer.
"Hopefully, I can progress even further."
Joyce seemed to be set for a real hiding when a missed green enabled Trump to snatch the opening frame aided by an earlier 46.
Runs of 104 and 57 set the Bristol player on course for a thumping win, but the mood of the match changed when Trump missed a ludicrous attempt at a five-ball plant on the reds having made 37. It was almost like Trump was content taking liberties, but the strategy backfired dramatically.
Trump handed 36 points back in fouls before Joyce ran in 41 to close to 3-1 behind.
A 56 saw Trump build a 4-1 advantage only for Joyce to maintain interest by claiming the sixth frame.
Trump moved to within one frame of the winning line with a 74. Little did he know then that he would lose the next four as efforts of 57, 44 and 39 saw Joyce force a deciding frame that he would win.
Joyce will face Ali Carter for a place in the quarter-finals after last year's World Championship finalist completed a comfortable 6-2 win over Steve Davis in a match that saw both men struggle for their true form.
- Sports & Recreation