Winston Reid hit a controversial winner as 10-man West Ham took the derby honours with a narrow victory at Upton Park.
The Hammers were reduced to 10 men with the game just nine minutes old when skipper Kevin Nolan was red-carded for a crude challenge on Jack Smith.
Liam Trotter (66mins) cancelled out Carlton Cole's 45th-minute opener, but barely two minutes later Julien Faubert flattened Lions keeper David Forde as he came out to deal with a deep delivery into the danger zone. The keeper was unable to get enough purchase on the ball and it dropped to Reid on the edge of the area, who hit an unstoppable first-time shot that whistled into the back of the net.
Lions boss Kenny Jackett could not hide his frustration that Reid's goal was allowed to stand, condemning his men to a fourth league defeat in the last five outings.
"It was definitely a free-kick on the goalkeeper," said Jackett.
"Whether it's a decision to catch or punch, the guy has come in and wiped the legs away from our keeper.
I've watched it on the monitor again and it was a free-kick.
I haven't spoken to the referee, there is no point because it is not going to change the result.
We need to move on now. We have got 17 league games remaining and we need 21 points from those to get to the 50-point mark and give ourselves a chance."
Hammers boss Sam Allardyce added: "It was a stroke of fortune for us because it's resulted in a goal, but for me, the taking of the chance created when the foul wasn't given on their keeper was of ultimate importance."
For Millwall, what is of greater importance now is to pick themselves up from this disappointment and regroup in a bid to kick on, and up the Championship table once more.
There were enough positive signs from this match to indicate that The Lions will claw their way out of trouble, but Jackett's men cannot afford to spurn opportunities when presented.
Handed a numerical advantage, The Lions still rarely failed to test Robert Green in the home goal.
The England stopper, who nervily fumbled the ball behind for a corner within the opening 20 seconds, had a quiet first 45 minutes in which he comfortably collected Liam Feeney's low shot on the turn and then smartly collected from Darius Henderson when a promising three on two move instigated by skipper Liam Trotter failed to materialise into an effort on goal.
At the other end Forde made an easy stop from James' Tomkins' header and Joey O'Brien fired over with a powerful shot as west Ham threatened in patches.
Cole did well to chest down the ball five minutes before the break and line up a shot, although he dragged his effort wide.
However, despite their numerical advantage, it was Millwall who fell behind in first half stoppage time.
West Ham were awarded a free-kick just inside the Lions' half following a foul by Darren Ward on Cole. Mark Noble's deep free-kick was flicked on by Reid and headed home by Cole with virtually the last piece of action in the first half.
The Lions started the second period surprisingly sluggishly, picking up two yellow cards in six minutes instead of picking up the pace of the game.
Jackett's men had a lucky let-off a couple of minutes after the restart when George McCartney's dangerous cross was headed onto the bar by Faubert with Forde beaten.
Kenny introduced Harry Kane for Scott Barron on 57 minutes and The Lions went close soon after when Feeney's inviting delivery beat Green but just failed to find Henderson at the back post.
Home defender Tomkins made a crucial clearance to prevent Kane connecting with debutant Andy Keogh's cross but the visiting fans didn't have to wait long to celebrate an equaliser, which came in the 66th minute.
Henderson played a neat pass back to Trotter and he thumped home from just inside of the 18-yard box.
But the celebrations were cut short in controversial style just two minutes later.
Tomkins' header from Matt Taylor's corner was hacked off the line by Kane but his clearance was whipped back into the box by O'Brien. Although Forde punched the ball clear it only went as far as Reid, whose first-time volley flew into the net.
Forde appeared to have been clattered into by Faubert after punching clear but the referee either ignored or failed to see what looked to be a clear foul and the goal stood.
Aggrieved by this, The Lions pushed forward in a bid to haul themselves level for a second time.
Alan Dunne's stunning 35 yard drive flew just wide of the post with Green at full stretch on 77 minutes and Kane's 25 yard free-kick sailed harmlessly wide before Dunne again saw his 85th-minute drive spilled by the keeper, who quickly gathered at the second attempt.
The Lions were awarded a couple of corners which came to nothing before five minutes of stoppage time were signalled.
Even Forde came forward for a 95th minute corner but West Ham cleared comfortably to claim all three points.
West Ham United: Green, Reid, McCartney, Nolan, Tomkins, Cole (Vaz Te, 88mins), Collison (Taylor, 46mins), Faye, Noble, O'Brien, Faubert (O'Neil, 80mins). Subs not used: Baldock, Maynard.
Bookings: Faye (81mins), Cole (85mins)
Sent off: Nolan (9mins)
Scorers: Cole (45+2mins), Reid (68mins)
Millwall: Forde, Dunne, Smith, Abdou, Ward, Lowry, Barron (Kane, 57mins), Trotter, Henderson, Keogh, Feeney (Mason, 80mins|). Subs not used: Allsop, N'Guessan, Wright.
Bookings: Henderson (49mins), Lowry (52mins), Ward (67mins), Forde (75mins)
Scorer: Trotter (66mins)
Ref: M. Jones