Harlequins: (7) 19
Tries: David, Walker, Green Cons: J Evans 2
Leicester: (10) 20
Tries: Wiese, Brown Pens: Pollard 2 Cons: Pollard 2
Mike Brown scored a decisive try as Leicester beat his old side Harlequins to stop them going top of the table.
Tigers' Handre Pollard kicked a penalty and converted a Jasper Wiese try before Quins hit back through Nick David to trail by three points at the break.
A Jack Walker score edged Quins ahead before Brown crossed under the posts.
Another Pollard penalty proved key, as Jarrod Evans failed to convert a last-gasp Tyrone Green try that would have won it for the hosts.
The dramatic ending lifts Tigers into the Premiership's top six for the first time this season, giving their semi-final aspirations a massive boost before a two-month break in league action to accommodate the Six Nations.
With both sides making numerous changes because of the unavailability of international players, there were a number of debuts and firsts across the park at Twickenham Stoop.
Joe Launchbury led Quins as captain for the first time, while fourth-choice tight-head Dan Richardson started in the league for the first time for Tigers.
After a stuttered and at times low-quality start in London, two-time World Cup-winning South Africa fly-half Pollard put Tigers ahead with a 16th-minute penalty.
A excellent break from Ollie Hassell-Collins from the halfway line was instrumental in turning that into a 10-point lead soon after.
While the initial raid on the line ended with a try being chalked off for a forward pass, a penalty advantage kept Leicester on the attack with a line-out.
And Wiese took full advantage with a powerful finish in the corner as he peeled off the maul.
Quins, however, hit back with their first and only serious attack of the first 40 minutes, as David finished a breakaway that was started by Evans in his own half.
Andre Esterhuizen scythed through Tigers' defence and appeared to put the hosts ahead early in the second half, only for his effort to be disallowed for offside.
It was an early hint of the pressure Quins would pile on Tigers, who eventually buckled on their line as Walker crashed over from a maul.
Their advantage was short-lived, as former Quins favourite Brown - who won a Premiership title and European Challenge Cup during his 16 years with them - finished another explosive move instigated by Hassell-Collins.
Pollard slotted his fourth kick of the night to give Dan McKellar's Tigers a six-point lead late on, but when Green managed to cross to euphoric scenes with just seconds remaining it appeared Evans would seal victory with the boot.
But he made a mess of a seemingly straightforward conversion, leaving all at Twickenham Stoop stunned as second-placed Quins failed to make it five consecutive wins in all competitions.
'Tigers remain well and truly in hunt' - reaction
Harlequins coaching coordinator Danny Wilson told BBC Radio London:
"I commend the foundation of our effort, fight and spirit to get back into the game and to get ourselves into a position where we could have won it at the end.
That is the positive, but the negative is that we made too many errors in a host of areas where, perhaps, we have been a lot more solid.
"We obviously lacked a bit of cohesion with a lot of combinations in key positions that haven't played any rugby together, let alone much rugby together. So I think that, in those key positions, with the experience that perhaps they had in those game-controlling positions led to them commanding the kicking game.
"It was a frustrating night, but like I said it was a number of new faces that have shown the same Harlequins spirit and fight that is important to us, and we will build on that going into the next games."
Leicester Tigers head coach Dan McKellar told BBC Radio Leicester:
"It was nervous, without a doubt, and disappointing that it had to come down to that kick because I thought we played really well tonight for long periods of time.
"We should have had it wrapped up earlier. But I'm just wrapped for the boys that after 23 weeks on the trot they can go into a 10-day break feeling pretty good about themselves and we are still well and truly in the hunt.
"It would have been shattering to have had to walk down and pick the boys up if we did lose that game, but sometimes you do need a bit of luck. And we were probably due a little, to be honest."
Harlequins: Green; David, Joseph, Esterhuizen, Lynagh; Evans, Green; Baxter, Walker, Collier; Launchbury (capt), Herbst, Hammond, Evans, Chisholm.
Replacements: Riley, Garcia Botta, Lewis, Clark, White, Gjaltema, Edwards, Murley.
Leicester Tigers: Shillcock; Brown, Kelly, Kata, Hassell-Collins; Pollard, Whiteley; Cronin, Montoya (capt), Richardson; Wells, Hatherell, Liebenberg, Cracknell, Wiese.
Replacements: Theobold-Thomas, Whitcombe, Hoyt, Carter, Rogerson, Carnduff, Youngs, Scott.
Referee: Tom Foley.
El Chapo, the Cocaine Kingpin: The story of Mexican drug lord Joaquin Archivaldo Guzman Loera, better known as El Chapo
India's most fashionable city: Meet the glamorous super-rich of Mumbai