Bristol-based Trump had it all to do going into the day trailing 10-6 to Junhui, but a couple of century breaks saw the World number five close the gap out to 12-10.
Trump missed several chances at 12-10 to continue his impressive comeback, with Junhui finishing the tie to make the quarter-finals for the fourth time.
Trump will now have to wait a year for another crack at snooker’s biggest prize, whilst Ding faces Welshman Mark Williams in the quarter-finals.