It was their third-successive victory after ending their appalling run of nine straight defeats with wins over Saracens and Sale in the previous fortnight.
Victory enabled them to move above Northampton Saints, beaten at Newcastle today, and Worcester.
Samoan-born Tani Fuga, Steve So'oialo and flanker Nick Easter scored the Quins tries with Irish fly-half Jeremy Staunton kicking 14 points and his replacement Andy Dunne landing their final conversion.
Leeds replied with tries from left wing David Rees and centre Chris Bell, both converted by former England full-back Tim Stimpson, who also landed a penalty.
However, it was Stimpson's failure to find touch which led to Quins taking the lead after 17 minutes.
His kick flew straight into the arms of right-wing George Harder who collected gratefully and ran hard before sending hooker Fuga over in the left-hand corner for an unconverted try.
Stimpson made partial amends by landing a penalty, cancelled out by one from Staunton, converting after Chris Bell burst through the Harlequins defence to put Rees over near to the left corner flag.
But Staunton landed a penalty on the stroke of half-time to send Harlequins in 11-10 ahead, and they never lost their grip on the match.
Staunton landed another penalty in the 42nd minute and converted when So'oialo grabbed an opportunist try on the hour mark.
Leeds were penalised defending an aggressive Harlequins maul and the scrum-half capitalised with a quickly-taken penalty to squeeze over for his side's second touchdown.
After Staunton's fourth penalty, another powerful rolling maul resulted in Harlequins driving Easter over for their third try, converted by Dunne.
Almost immediately Leeds kicked back with a runaway try by Bell, converted by Stimpson, but it was too little too late.
Harlequins were good value for a win which would have been even more emphatic but for a stout defensive display by Leeds.
Fuga was denied a second try when he was hauled down just inches from the Leeds line and they also repelled powerful runs by back-row men Tony Diprose, Easter and winger Harder.
Harlequins threw everything into attack in the final minute in the search for a fourth try, which would have given them an important bonus point, but Leeds kept them out.
For NEC Harlequins:Tries: Fuga, So'oialo, EasterCons: Staunton, DunnePens: Staunton 4
For Leeds Tykes: Tries: Rees, BellCons: Stimpson 2Pen: Stimpson