Despite the loss, Parker Pen Challenge Cup finalists Wasps, still remain in second spot on the Premiership table booking a home semi-final against Northampton as they bid to win a place against Gloucester in the Twickenham Final on May 31.
Wasps enjoyed the lead for most of the match and had an 18-8 advantage early in the second-half courtesy of tries by recalled Scottish winger Kenny Logan and prop Craig Dowd.
However, Harlequins stormed back in the second period to take the lead after tries by scrum-half Matthew Powell and left wing Ugo Monye, who scored earlier, were converted by fly-half Paul Burke to give them an 22-18 lead.
Wasps reduced the gap to just a single point when fly-half Alex King slotted over his fourth kick of the match. However, Burke sealed the win for Harlequins when he put over a drop-goal with five minutes to go.
Quins now finish seventh in the table, and face Leicester Tigers in the Zurich Wildcard play-offs in a bid to win a place in next season's Heineken Cup.
For Wasps:Tries: Dowd, LoganCons: KingPens: King 3
For Harlequins:Tries: Monye 2, PowellCons: Burke 2Pens: Burke