Quins were on a poor run of form, having lost four of their last five games in all competitions, and were left trailing in the first half after Tom Homer scored all of London Irish's points to give them a 13-10 interval lead.
But Tom Williams, who assisted with Tom Casson's first-half try, won a race to a loose ball to touch down after the restart before also having a hand in full-back Ross Chisholm's score that killed off the Exiles challenge.
Quins fell behind inside the first four minutes as Homer broke through the Harlequins line in the 22 and dived over before converting his own score.
Fly-half Nick Evans responded with a penalty four minutes later but Homer thought he had cancelled that score out, only to see his kick from just inside the Quins half drop under the bar.
Evans' radar was also slightly off as he missed two relatively simple penalty chances to put Quins on top.
But an excellent line-break from Williams after 22 minutes put Quins on the front foot, and some neat interplay tight on the right eventually led to Luke Wallace feeding Casson who dived over to put Quins in front for the first time in the match.
But after some solid yard making from the London Irish backs, Homer drew the scores level with a 40-yard penalty before sending Irish in three points ahead with the last kick of the half.
Irish though made a hash of the restart as Dan Bowden's kick was charged down by lock George Robson. Williams showed the most pace to just reach the bouncing ball to score within 30 seconds and put Quins back in front.
A huge Quins maul then pushed into the Irish 22 before Danny Care kicked an unorthodox drop goal from the ruck to send the hosts 20-13 ahead.
Irish hit back when after 51 minutes centre Jonathan Joseph broke free from three separate tackles and burst over the line, with Homer's conversion levelling the scores again.
Another Evans penalty six minutes later edged Quins back in front and then they pulled away from the visitors when Williams sent a grubber through for Chisholm to collect and hand off Homer expertly to give himself a clear run to the whitewash.
Adrian Jarvis's 75th-minute penalty gave Irish hope but they could not find another score as they slipped to a fourth straight away defeat.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.