The 27-year-old defender enjoyed his first taste of competitive football this season after finally recovering from a troublesome knee injury and settled well into a three-man central defence alongside Steve Potts and youngster Izzy Iriekpen - also making his return to action after a lengthy injury lay-off.
Pearce left the field as a precaution with 20 minutes remaining and, having helped the Hammers preserve a hard-fought 1-0 lead, was then sorely missed as the Gunners rallied in the final stages to snatch an undeserved 2-1 victory.
Svetoslav Todorov's well-taken first half opener was ruled out by an 81st minute header from Tony Adams - making his own comeback from injury along with goalkeeper David Seaman in the Arsenal line-up - before a thunderous 30-yard strike from Brazilian midfielder Edu in the final minute secured all three points for the visitors.
The defeat was hard luck on Roger Cross' team, who for long periods had matched and even outplayed a strong Arsenal side containing big money signings Francis Jeffers and Junichi Inamoto.
Bulgarian striker Todorov gave the Hammers a deserved lead on 18 minutes when he latched on to a pass from Laurent Courtois following good work by Titi Camara and held off Adams before coolly slotting past Seaman from 10 yards out.
Camara went close to doubling the lead soon after when he curled a free-kick just inches wide of the post while Todorov fired a volley over the bar from the edge of the box.
The Bulgarian almost provided a goal for midfielder Shaun Byrne when he cut the ball back from the byline early in the second half, but Seaman did well to tip the ball away.
Arsenal were lucky not to be reduced to 10 men in the 57th minute when Edu was only cautioned for a nasty two-footed tackle on Pearce, but the challenge thankfully had nothing to do with the defender's withdrawl soon after.
The Gunners' class began to show late in the game as Hammers tired. Debutant Hammers goalkeeper David Forde pulled off a stunning save to deny Jeremie Aliadiere in the 79th minute but could do nothing to prevent Adams heading the equaliser from close range two minutes later.
The draw would probably have been a fair result, but Edu - fortunate to still be on the field after his earlier misdemeanour - had different ideas as he collected a poor clearance in the centre of the field and strode forward before unleashing a blistering left-foot effort that flew past Forde and crashed in off the crossbar to secure the win.
Hammers' coach Roger Cross said afterwards: "It was disappointing to lose the game because we did play well and deserved to get something out of it.
"To be fair, we did run out of legs in the last 20 minutes and taking Ian Pearce off meant that Tony Adams would be more of a threat at set-pieces. Sure enough, he popped up to head the equaliser and then they grabbed a winner with a fantastic effort that gave our keeper no chance.
"We had a lot of players out there who haven't played for a while, Ian Pearce and Izzy Iriekpen of course, Shaun Byrne - who is only just coming back - and Steve Potts hasn't been involved this year either, so in the circumstances I was very pleased with the way we played against a good side.
"The big plus was obviously seeing Ian out there again. I thought he did very well and came through what was a big test for him. The timing isn't quite there yet, but that is only to be expected after nearly a year out and he will get better with every game.
"Overall, I think a draw would have been a fair result tonight. Sadly, we weren't able to kill them off with a second goal - a problem we have had all season - but there were still plenty of bright spots."
Team: Forde, Charles, Soma, Pearce (Riza 70), Potts, Iriekpen, Byrne, Ferrante, Courtois, Camara, Todorov. Subs unused: Bywater, D.McMahon, Khan, Eastwood.