Mike Brown's decisive try continued Harlequins' late charge for a place in the Aviva Premiership play-offs and ended Leicester's seven-match winning league run.
Brown powered over in the 70th minute to snatch victory for Quins, who battled back from 10-0 and 13-3 down to secure their third successive triumph 24-20 in a pulsating showdown at Twickenham Stoop.
Referee Tim Wigglesworth awarded the 2012 Premiership champions a penalty try and was involved in several other controversial decisions.
It was another eventful evening for Wigglesworth, who presided over Gloucester's violent clash with Bath at Kingsholm last Saturday.
In that match he issued five yellow cards and two red, and in a feisty showdown in south west London there were sin-binnings for George Robson, Pablo Matera and Julian Salvi.
Matera had tip-tackled outstanding Quins hooker Dave Ward and Robson retaliated by clothes-lining Leicester's back-row substitute, while Salvi saw yellow for a professional foul.
Fly-half Nick Evans kicked three penalties and a conversion as fifth-placed Quins kept up the pressure on the top four with a critical match against closest rivals Bath looming on May 10.
Vereniki Goneva and Jamie Gibson scored tries for Leicester, whose hopes of replacing Northampton in second have dimmed.
Club captain Toby Flood was restored to the Tigers' starting XV for the first time since February after being preferred to Owen Williams and he finished with 10 points.
Only a minute was on the clock when Flood drew first blood with a penalty and he was involved as the Tigers plundered their first try, sending Ed Slater into space to leave Quins scrambling.
Jordan Crane continued the move and slipped the scoring pass to Goneva with technical difficulties resulting in a delay before the try was awarded by the TMO.
Trailing 10-0 after just five minutes, Quins responded with a high tempo spell launched by Brown and ending with a poor decision by Wigglesworth - who bizarrely award Leicester a penalty even though Anthony Allen had tackled Danny Care without the ball.
Evans and Flood kept the scoreboard moving with penalties amid the teams trading blows in open play and it took a muscular tackle from Brown to stop rapid American wing Blaine Scully.
Ward was involved in most of Quins' finest moments and a terrific kick through from Evans deserved a try, but centres Manu Tuilagi and Allen combined magnificently to deny Luke Wallace over the line.
The 2012 champions were controlling the second quarter and their endeavour was rewarded when Leicester's scrum disintegrated five metres from their own line and Wigglesworth awarded a penalty try.
Control turned into dominance in the second half with Quins visiting the opposition 22 with increasing regularity.
The TMO ruled out a try for Brown in the left corner after Scully had got a hand on the ball and a key intercept by Flood prevented a likely try in the opposite corner.
Quins took the lead for the first time in the 58th minute with an Evans penalty after Wigglesworth had wrongly penalised Marcos Ayerza, but the advantage lasted only seconds.
Tuilagi made a break and after two quick tap penalties in succession taken by Ben Youngs, blindside flanker Gibson forced his way over and Flood converted.
A thrilling match was nearing its dramatic conclusion as Brown fended off tackles from Tait and Scully after Leicester had been outfoxed in midfield to touch down.
The Tigers' woes continued when Salvi was sin-binned for playing the ball on the ground, before substitute Ben Botica landed a penalty in the last act of the game.