Dott edged world number six Williams in a tense match
Scotland's Graeme Dott produced a final-frame break of 70 to beat world number six Mark Williams and reach the last eight of the Shanghai Masters.
Williams lost the first frame to give the early initiative to Dott who went 3-1 up before the Welshman hit back.
A 61 break put Dott 4-3 up before an 83 by Williams made it 4-4, only for the Scot to take it in the final frame.
Dott's opponent in the quarter-finals will be Jamie Cope, who saw off home favourite Ding Juhui 5-1.
Mark Davis also enjoyed a win over a higher-ranked opponent, knocking out world number five Stephen Maguire 5-3, despite having trailed 3-2 at one point.
A break of 100 put Maguire 3-2 up but this just inspired Davis to run away to victory.
World number four Ali Carter sealed his place in the last eight with a 5-3 win over Stuart Bingham, and he will now take on Matthew Stevens, who beat Shaun Murphy 5-2.
World number 44 Jamie Burnett had an emphatic 5-0 win over world number 33 Andrew Higginson, and in the late games Mark Selby beat Martin Gould 5-4 to set up a clash with Mark King, who saw off Peter Ebdon 5-3.