Summer signing Dany N'Guessan's late goal for Millwall proved enough to defeat Portsmouth at The Den.
Substitute John Marquis had gone close for the hosts in the second half, lifting his finish just wide, but the game had seemed destined for a draw.
David Norris's blocked shot was the best of Pompey's few chances, while Greg Halford wasted a counter attack.
N'Guessan bundled home Liam Trotter's knockdown before sending a brave header just wide.
The first half was low on entertainment, Portsmouth captain Liam Lawrence sending a header over the top from the best opening.
Liam Trotter failed to convert after Pompey's Stephen Henderson spilled Liam Feeney's drive in stoppage time, but there was better to come after the interval for the hosts.
Brian Howard stung Henderson's palms with a free-kick before Marquis's clipped finish strayed just wide from Feeney's through ball.
N'Guessan's close-range finish edged Millwall ahead with eight minutes of normal time remaining and the visitors, who were unbeaten in their previous four matches, could not muster a response in the time remaining.