Harlequins (12) 22
Tries: Ellis, Dorn 3 Goals: Purdham 3
Warrington (24) 36
Tries: Clarke, Solomona 2, Cooper, Bridge 2 Goals: Bridge 6
Injuries had previously restricted Chris Bridge to just four tries this season
Chris Bridge returned from injury to claim a 20-point haul for Challenge Cup winners Warrington at The Stoop.
But, on their return to London just a week after retaining the Cup, Wolves did not have it as easy as last week
Tries from Andy Ellis and Luke Dorn, who went on to get a hat-trick, earned Quins a 12-0 lead inside eight minutes.
Jon Clarke, David Solomona (2), Mike Cooper and Bridge (2) hit back but rivals St Helens now need only an eight-point win to clinch second spot.
Warrington rested five of their Wembley heroes at The Stoop ahead of next week's play-offs, skipper Adrian Morley, centre Matt King, second row pair Louis Anderson and Ben Westwood and Lance Todd Trophy winner Lee Briers are all being held back a week.
That allowed recalls for Wembley discards Cooper and Richie Myler, along with Garreth Carvell, Vinnie Anderson and England international Bridge, for his first Super League appearance in two months after recovering from a shoulder injury.
But Warrington's hopes of a earning a big points advantage over Saints, who host play-off chasing Castleford on Saturday, did not come to fruition as Quins gave Brian McDermott, in his last game as Quins coach, a rousing farewell performance.
The Londoners would have also been boosted by the news from chairman David Hughes that the future of the club has been secured and the ownership crisis resolved, with Hughes set to take full control of the club.
Although Warrington temporarily reclaim second spot with this win, Saints are now favourites to secure the runners-up spot and host Warrington when second plays third in next weekend's play-offs opener.
Quins took the lead inside six minutes when Ellis burrowed over from close range after Olsi Krasniqi was held just short. And that lead was quickly doubled when Luke Gale and David Howell sliced open the Wire defence, allowing Luke Dorn to scorch over.
Under-strength Warrington were chasing but, once again, a penalty swung the flow of the game as Wolves kicked to the corner and, from the resulting possession, Clarke squeezed over.
A superb last-ditch tackle from Jamie O'Callaghan stopped Wembley hat-trick hero Chris Hicks going in at the corner but Solomona quickly made up for it with his first try - and, with the second of Bridge's six kicks, Warrington were level.
Warrington should have gone ahead for the first time on the half-hour when Anderson burst clear, but Myler spilled the ball with the line at his mercy. And, within minutes, Quins had done the same, Dorn unable to hold onto a pass after Gale had broken the line.
But the visitors killed Quins with two tries just before the break, Cooper cashing in after some fantastic handling from Michael Monaghan before Bridge added another on the hooter.
Back came the Quins after the break, Dorn gratefully pocketing a shocking pass from Monaghan to stroll over under the sticks. But Warrington steadied the ship once more when Solomona bulldozed over for his second try on 55 minutes, brushing aside four would-be tacklers. And the game was done as a contest just after the hour when Bridge romped clear after intercepting a poor Dorn pass.
To their credit the home side were still looking to put the ball through the hands, and twice the ball eluded Dorn when a clean take would have resulted in a try, but the Aussie was not to be denied, claiming his hat-trick when he cruised over in the corner.
Harlequins coach Brian McDermott said:
"I was really pleased with how we finished. Warrington are a very, very good side and took their tries well.
"It really hit me today that I was leaving and it has been an emotional day.
"But this is not the end for the club, it is a starting point. We have the London juniors coming through now and we have the talent pool
there to capitalise on.
"The club is very close to getting over the line and I think I have succeeded here. This club will always mean a lot to me and I have made a great number of friends among the players and staff. But the time was right to go and I am excited about heading to Leeds."
Warrington coach Tony Smith said:
"I thought overall we did a terrific job. We did not have the best of preparations as we had quite a bit of celebrating to do during the week, but the boys really stuck at it.
"I thought we showed some real toughness of character and a real desire to scramble in defence.
"Quins really came at us. They are a dangerous side to play against and our commitment was superb.
"I expected us to be disjointed at times and we were, but we still dug in and got the win. We have been consistent all year and, after 27 rounds, we have deserved to test ourselves in the play-offs."
Harlequins: Melling, Sharp, Clubb, Howell, O'Callaghan, Dorn, Gale, Ward, Ellis, Wilkes, Williamson, Purdham, Krasniqi.
Replacements: McCarthy-Scarsbrook, Mills, May, Bolger.
Warrington: Mathers, Hicks, Bridge, Atkins, Riley, Myler, Monaghan, Cooper, Clarke, Carvell, Solomona, V Anderson, Harrison.
Replacements: Higham, Mitchell, Evans, Wood.
Referee: Thierry Alibert (France).