Prior to the clash in Asia, the Welshman had failed to beat O’Sullivan in any of their matches during the last 12 years, and after losing the opening three frames it seemed the run would continue.
Five-time world champion O’Sullivan, who made three century breaks in his win over Anthony McGill in the second round, opened up a 3-0 lead in the quarter-final – a break of 72 his maximum tally.
However, Williams soon found his form and claimed the following five frames to lead before allowing O’Sullivan back in at 5-5.
But it was to be Williams' day as O’Sullivan struggled to find his rhythm in the deciding frame – potting just two reds – as the Welshman made breaks of 50 and 22 to advance into the last four.
"I haven't beaten him for so long, eventually I've got rid of that pain," Williams told worldsnooker.com.
"I was shocking for the first few frames and dragged Ronnie down, but after the interval I was a different player.
"It's an excellent win for me, even though Ronnie wasn't at his best. He's still the best player in the world."
O’Sullivan added: “"We both started poorly and I was struggling with my concentration. Then he played well to go 5-3. He's in good touch. At 5-3 I felt I had to make something happen, and that was the best I felt in the match."