Will Sharp's double ensured Harlequins toppled engage Super League leaders Leeds at The Stoop.
Winger Sharp - who had not scored a try all season for Quins - crossed the whitewash either side of the half-time interval for Brian McDermott's men.
Leeds' Scott Donald took his try tally to 21 for the season to reduce the deficit to four points late on but it was not enough to save the World Club champions - who had lost just twice in Super League all season - from defeat.
Leeds - who triumphed 36-26 over Harlequins in the Challenge Cup last month - took just three minutes to open their account when Great Britain captain Jamie Peacock burst through to score.
Kevin Sinfield added the extras for the Rhinos but Quins were soon on level terms as Sharp evaded Leeds full-back Brent Webb to cross the tryline.
Scott Hill's close-range try after a quarter of an hour put McDermott's men in control.
Leeds thought they had reduced the deficit when Danny McGuire offloaded the ball for Rob Burrow to score under the posts. But the visitors were denied the points when Sinfield was penalised for obstruction.
And to rub salt into the wounds, Henry Paul's 40-metre field goal from the resulting penalty increased Harlequins' lead to eight points.
Quins' lead was cut down to 14-12 on the stroke of half-time when Burrow's searching pass found Donald who crossed for his first try of the game.
After the break, Chad Randall's converted try stretched Quins' lead back to eight points but Leeds refused to be denied and Keith Senior ensured Leeds remained within a score.
But after Senior and Louie McCarthy-Scarsbrook - on his return from an arm injury - had been sin-binned for fighting, Sharp made it 28-16 with a try in the corner.
Burrow finally got his name on the scoresheet just a minute later while Donald reduced the arrears, but skipper Sinfield failed to score either conversion and cost the league leaders a point.