Mark Noble's first-half penalty proved enough to see off Pompey, who had David Norris sent off after the break.
Victory means Sam Allardyce's men, who were unceremoniously dumped out of the FA Cup by Sheffield Wednesday in their previous match, remain level with Southampton at the top of the table, while Michael Appleton's Portsmouth may still be looking nervously over their shoulders at the relegation zone seven points below.
The hosts carved out the first opening as Liam Lawrence lifted in a free-kick and Greg Halford eluded his marker to get to the ball first before steering his header over the bar.
But it was the Hammers using the ball to greater effect on the floor and midway through the half they crafted a move of genuine quality which saw Noble and Winston Reid play a clever one-two before the latter was brought down by Tal Ben-Haim in the box.
Referee Kevin Friend did not hesitate to point to the spot and Noble stroked home his fourth penalty of the season despite Stephen Henderson getting a hand to it.
Pompey were forced to make a change with just over half an hour gone as defensive midfielder Aaron Mokoena limped off following a challenge with Carlton Cole.
Appleton took the opportunity to introduce a more attacking player, bringing on Norway international Erik Huseklepp, who almost made an immediate impact.
He brilliantly controlled a lofted pass on his chest before cutting inside and feeding Norris, whose shot deflected wide off James Tomkins.
The same two players linked up again to earn a corner two minutes later as the home side cranked up the pressure, but the visitors cleared at the second attempt.
Portsmouth closed the half with another well-crafted opportunity as Dave Kitson sprayed a pass wide for Lawrence and the midfielder surged past George McCartney before stinging Robert Green's palms with a powerful effort.
The hosts continued to press after the break and looked the more likely to score next, although Jason Pearce's 40-yard effort proved a little too ambitious as it sailed clear of the bar.
Their chances of claiming something from the game were dealt a critical blow after 57 minutes though when Norris was dismissed for a foul on Reid.
Despite their numerical disadvantage, Portsmouth still looked a threat in front of goal and Marko Futacs pounced on Reid's poor defensive header but dragged his shot just wide from 20 yards.
It was West Ham who went closest in the second half, however, as Jack Collison curled in a superb long-range effort which came back off the angle of bar and post.
Henderson then had to be alert to keep out a wayward chested backpass from Halford as Allardyce's side sought to make the points safe.
They controlled possession for the final 15 minutes, sporadically threatening Henderson's goal and, crucially, denying Portsmouth any clear-cut opportunities to snatch a draw.
Kevin Nolan should have put the icing on the cake with four minutes left when Collison played him in but he lifted his shot over and, with Southampton winning comfortably at Nottingham Forest, the Hammers stayed second on goal difference.