Charlie Austin’s equaliser cancelled out Daryl Dike’s opener but Alex Mowatt’s free-kick and Carlton Morris’s second-half goal gave the visitors the points.
Barnsley are now unbeaten in eight matches.
Dike put the Tykes ahead by holding off Lee Wallace to head in Mowatt’s 23rd-minute corner at the near post – the American striker’s second goal since signing on loan from Orlando City at the start of last month.
Rangers hit back four minutes later with Austin’s fifth goal in 10 appearances since his return for a second spell at the club.
Ilias Chair’s lofted free-kick reached Yoann Barbet, whose left-footed volley was parried by keeper Brad Collins to Austin and the on-loan West Brom striker finished emphatically.
But Barnsley quickly regained the lead with a fabulous goal from Mowatt, who clipped his 25-yard free-kick beyond keeper Seny Dieng and into the top corner of the net.
And Morris doubled that lead 12 minutes into the second half, straight after coming on as a substitute.
Morris, a January signing from MK Dons, latched onto Mowatt’s ball over the top and raced away from QPR captain Geoff Cameron before slotting home his third goal in six games.
Rangers were well beaten but the result might have been very different had Austin or Lyndon Dykes been able to take early chances when the match was goalless.
Austin fired inches over after being found by Stefan Johansen’s excellent pass and the stretching Dykes was just unable to put away Todd Kane’s low cross from the right.
QPR struggled to create clear-cut chances in the second half and never looked like pulling off a comeback after Morris’ goal.
Mowatt’s strike was a beauty but Rangers’ failure to deal with a set-piece led to the first goal and a routine long ball caught them out for the third.
Support The Yorkshire Post and become a subscriber today. Your subscription will help us to continue to bring quality news to the people of Yorkshire. In return, you’ll see fewer ads on site, get free access to our app and receive exclusive members-only offers. Click HERE to subscribe.