Harry Kane's strike moved Millwall to the verge of safety and left Portsmouth on the brink of relegation to League One.
On-loan Tottenham man Kane thumped in from the edge of the area eight minutes before the interval to secure victory.
Luke Varney headed against the bar in the second period but Portsmouth are now nine points from safety.
Kenny Jackett's Lions move eight points clear of the bottom three with four games remaining.
Portsmouth, who last played in the third tier in 1982-83, went close early on when Maik Taylor pulled off an impressive double save from Chris Maguire and Varney.
Greg Halford headed over from a Scott Allan corner for the hosts but Millwall moved in front with Andy Keogh's twisting run ended with him teeing up Kane, who found the bottom corner with a powerful low shot for his third goal in three games.
Kane wasted the chance to double the advantage, failing to get a shot away after being sent clean through.
Varney headed against the bar from Halford's long throw and Taylor also saved Kelvin Etuhu's long-range strike as Millwall picked up a third win in five matches.