The former finalist resumed 10-6 behind and despite staging a valiant fightback to pull within two frames of his Chinese opponent, he had left too much to recover and fell to a 13-10 defeat.
Ding, forced to qualify this year after falling out of the world’s top 16, looked set to cruise into the last eight after winning two of the first three frames to move within one more of victory.
But Trump’s gradual recovery seemed to unsettle his opponent until a messy 23rd frame eventually fell the way of Ding to book the fourth last-eight place of his career.
Rising star Kyren Wilson also reached the quarter-finals after holding his nerve to see off Northern Ireland’s Allen in the other match in the afternoon session.
Jeremy McWilliams notches Bishopscourt double at Classic Bike Festival Ireland on Michael Dunlop's Team Classic Suzuki
In Pictures: Team NI's Commonwealth Games medal winners
Manx Grand Prix: Michael Dunlop gears up for Classic Superbike victory bid on new Team Classic Suzuki GSX-R750
Blackpool reject bid for Shayne Lavery amid Millwall speculation
Kofi Balmer 'feels amazing' after making dream move to Crystal Palace
Wilson resumed with an 11-5 advantage but Allen raised hopes of completing a spectacular fightback as he took the first four frames of the session to move within two.
But breaks of 51 and 71 secured a superb 13-9 victory for Wilson, the world number 19, who will now go through to face world number one Mark Selby in the quarter-finals.