The Hammers' club-record signing was controversially dismissed after making little contact with Swans defender Chico Flores, having earlier assisted the home side's two goals
The home side landed the first blow, as Carroll, making only his second Premier League start of the season, cushioned a header into the path of Kevin Nolan, who controlled the ball with his chest before volleying it into the bottom corner.
On the stroke of half-time, the same two players combined again to extend the east Londoners' lead; Carroll rose highest at the back post to header the ball back into the six-yard box, where Nolan was able to glance an uncontested header into the back of the net.
|VIEW FROM UPTON PARK
|By Liam Twomey
Not for the first time this season boos rang out after the final whistle at Upton Park, but this time the home side were not turning against their own team. Chico Flores and Howard Webb were the target of the ire, having between them brought about the harsh dismissal of the outstanding Andy Carroll on the hour mark.
The former Newcastle striker was at the heart of everything West Ham did well here, dominating Swansea in the air and assisting both of Kevin Nolan's goals. He deserved a better fate than an early bath and three-match ban.
Yet perhaps the biggest source of frustration for Michael Laudrup may be that, despite playing the last 30 minutes with 10 men, West Ham closed this victory out with considerable comfort. After Wednesday's draw with Chelsea this is another big result in their fight against relegation, while Swansea fall once again back towards the danger zone.
Both clubs were active in the January transfer window, though no new signings made the starting XI; Italian duo Marco Borriello and Antonio Nocerino were among West Ham's substitutes, while Swansea manager Michael Laudrup kept David N'Gog in reserve.
The hosts started the brighter, and had the first chance of the game when Carroll headed Matt Jarvis' cross wide after six minutes.
Allardyce's men continued probing, and deservedly took the lead through Nolan's well-taken 27th-minute strike. The skipper still had plenty to do after the unmarked Carroll nodded down Matt Taylor's delivery, but he took a touch before expertly volleying home from just inside the area with his left foot.
Swansea responded well to going behind, but failed to test home keeper Adrian and were made to pay on the stroke of half-time as West Ham's tried-and-trusted method of Nolan feeding off Carroll's knock-downs bore fruit once again.
More lacklustre marking from Swansea was punished, as they again failed to pick up Carroll, who nodded Stewart Downing’s corner back across goal for Nolan to divert a close-range header beyond the helpless Gerhard Tremmel.
The home side picked up where they left off after the interval, and Jarvis rounded Tremmel before seeing his cross hacked clear by Ben Davies.
However, the pattern of the game was turned on its head when Webb showed no hesitation in dismissing England international Carroll for his part in the seemingly innocuous incident with Chico, a flailing arm merely glancing the defender.
Inevitably, Swansea then began controlling the game but struggled to force Adrian into action as West Ham dropped deeper.
But despite their territorial dominance, Laudrup's side - who are now winless in six league games away from home - were impotent in attack, with Wilfried Bony spurning their only real chance by volleying over the bar 10 minutes from time.
West Ham, who introduced Nocerino for match-winner Nolan in the closing stages, were able to hold on relatively comfortably to record their 11th Premier League clean sheet of the campaign - the most shut-outs in the division.