Jordy de Wijs scored a late winner for QPR as they came back from two down to pull off a dramatic derby victory.
First-half goals from Jed Wallace and Mason Bennett but the visitors in command.
But Charlie Austin scored six minutes into the second half and Stefan Johansen equalised before Dutch defender De Wijs rose to head home Ilias Chair’s corner four minutes from time.
Millwall took the lead after only six minutes following an error by Todd Kane.
After Kane was dispossessed by George Evans, Ryan Woods threaded through a perfect pass to Wallace, who fired into the far corner of the net.
Rangers thought they had equalised when Rob Dickie nudged the ball in after Lyndon Dykes’ long throw had been headed on by De Wijs.
But Dickie was adjudged to be offside – and soon afterwards the defender’s header from another Dykes throw was kept out by keeper Bartosz Bialkowski.
And after those two scares, Millwall scored from their own long throw six minutes before half-time.
Bennett netted moments after a dreadful miss when he shot tamely straight at keeper Seny Dieng after beating the Rangers offside trap and finding himself through on goal.
The striker atoned in emphatic fashion by getting in front of Kane to acrobatically hook the ball in after Mahlon Romeo’s throw had been headed on by Jake Cooper.
Another flick-on by Cooper early in the second half, this time from Evans’ lofted free-kick, teed up Shaun Hutchinson, who shot wide from near the edge of the six-yard box.
A third goal would almost certainly have sealed the win for Millwall.
Instead, Rangers were given hope by Austin’s sixth goal since rejoining the club on loan from West Brom at the end of January.
Geoff Cameron sent the ball in from the left and Austin got in front of Alex Pearce to head beyond Bialkowski.
Hutchinson was then guilty of an even worse miss when he skied a first-time effort over the bar from a few yards out after being found by Wallace’s free-kick.
That miss, and Woods losing possession, proved costly for the Lions, whose lead was wiped out in the 67th minute.
After Chris Willock had robbed Woods, Dykes fed a pass through to Lee Wallace, whose low cross from the left wrong-footed Cooper and dropped to Johansen. The Norwegian was also off-balance but managed to readjust his position and scuff the ball in from close range.
As Millwall wilted, QPR pushed for a winner and were rewarded by De Wijs’ first goal since arriving on loan from Hull.
QPR: Dieng; Dickie, De Wijs, Barbet; Kane (Adomah 78), Cameron (Field 70), Johansen, Willock (Chair 70), Wallace; Dykes (Ball 90), Austin (Bonne 78).
Subs not used: Lumley, Kakay, Thomas, Hamalainen.