Trailing 10-6 overnight O'Sullivan started the session in fine form, winning three of the opening four frames.
This included a sensational break of 146, the third ever at the Crucible, which could have been a 147 were it not for a mistake (which some have questioned as deliberate) that forced him to take one pink.
It still gives him the highest break of the tournament so far, beating Mark Selby's 143 from earlier in the day, but he will not be able to fight for a sixth title until next year.
The Rocket came out with renewed purpose and looked a completely different player to the previous day as he showed exceptional cue control.
Even whilst O'Sullivan was racking up the points Ding didn't look fazed and when he came to the table he took his chances, notching breaks of 69 and 87 to move to within one of victory.
A rare mistake in the 22nd frame gave O'Sullivan the opportunity to pull one back, which he took with a fantastic clearance.
In the next frame a couple of slack shots from O'Sullivan opened the door for Ding and at the second attempt he held his nerve and secured the win.