Both of Town's goals came within the space of four second-half minutes, with Elias Kachunga scoring the opener and then winning the penalty for the second, which Steve Mounie put away.
Another defeat for Mark Warburton's QPR leaves them just three points above the Terriers.
Huddersfield started brightly and their high-press tactics almost paid off inside the first minute as Lewis O'Brien capitalised on Todd Kane's loose pass out from defence, but the Town man could only blaze a shot wide.
QPR's impressive Eberechi Eze then cut in from the left and dinked a ball into the box which picked out Jordan Hugill, but the forward could only place his effort into the side-netting.
Town full-back Harry Toffolo then blazed an effort high and wide over the visitors' bar after Mounie picked him out.
Eze was enjoying plenty of the ball and after some silky glimpses of skill, he cut inside and unleashed a shot which Jonas Lossl, making his first appearance since rejoining Town on loan from Everton, did well to parry away.
QPR were dominating large patches of the first half and after a fine, flowing move Luke Amos then saw a vicious shot tipped over by Lossl.
From the resulting corner Rangers' skipper Grant Hall created the clearest goalscoring chance of the half but could only place his header against a post as the visitors upped the ante.