Shaun Wright-Phillips, an early substitute for the injured Junior Hoilett, struck a brilliant 78th-minute winner against the club he left in 2008 to further erode the Blues' fading title hopes.
Wright-Phillips' second goal of the season topped a fine performance from QPR that was a vast improvement on Sunday's tame home surrender to Liverpool.
QPR suffered a setback when Hoilett limped off in the 16th minute with what appeared to be a hamstring problem, resulting in Wright-Phillips' arrival from the bench.
Moses wasted a glorious chance three minutes after the interval when he steered Marin's fast pass wide when only four yards out.
QPR's goal was coming under growing pressure with Ivanovic grazing the crossbar, Luiz seeing a rocket blocked and only a brave save by Julio Cesar denying Torres from point-blank range.
Taarabt and Wright-Phillips combined superbly to tee up Granero but the Spaniard's shot was plucked from the air by goalkeeper Ross Turnbull, who started ahead of groin injury victim Petr Cech.
QPR were now in the ascendancy with Jamie Mackie denied a one on one with Turnbull by a last-ditch tackle from Gary Cahill before Shaun Derry's header was caught by the Chelsea goalkeeper.
Frank Lampard then stabbed the ball home but the flag had been raised for offside in what was a close but correct call. Once again Chelsea faded and this time QPR took advantage, working the ball from a corner via Taarabt to Wright-Phillips, who drove the ball into the bottom left corner of the net from the edge of the area.
Ivanovic nodded over the crossbar in the dying moments and QPR held on for a precious three points.