The Bluebirds rather fluffed their lines on their Premier League bow, with Jole Cole and Kevin Nolan offering an opening day reminder to former Hammer Malky Mackay of how difficult life among the elite can be.
It took just 13 minutes for Cardiff's backline to be breached, as they struggled to get out of the blocks and offered little in terms of attacking threat.
Matt Jarvis fired over a low cross from the left which Cole was able to gather 12 yards from goal, spin and arrow a drive into the bottom corner.
The Hammers barely got out of first gear during the second half, but doubled their lead on 76 minutes when Mark Noble teed up Nolan to whip a first-time effort past David Marshall.
West Ham were coasting until the interval after creating several good chances that were wasted by Cole, Jarvis and Mohamed Diame.
Two of them were heavily involved early on, Jarvis floating a clever cross to the far post only for Cole to produce a poor header as the hosts failed to make the most of a promising start that saw the trickery of Modibo Maiga cause problems.
Maiga helped set up a chance for Jarvis that was spoilt by the winger's poor first touch and Cardiff staged a counter attack that ended with Kim Bo-kyung driving high and wide over the crossbar.
Kim had Craig Bellamy in support and the South Korean was scalded by his captain for declining to pass.
Play quickly swept to the other end as West Ham plundered their first goal by capitalising on some indecisive defending.
Jarvis, who was proving a handful down the left, sent a pass across the face of goal to Cole who controlled the ball, turned and stabbed it into the bottom-right corner.
With just goalkeeper Marshall to beat, Cole would have had a second after being played in by a beautiful pass but his control deserted him.
Diame was becoming increasingly influential and Cardiff were relieved when his shot, which deflected off struggling full-back Matt Connolly, crept around the right post.
Cardiff made a bright start to the second half, with Fraizer Campbell prominent and a frantic goalmouth scramble ensued with West Ham prevailing through sheer weight of numbers.
The match was evenly balanced now as it swept from end to end, Cole again undermined by his control as he took sight of goal.
Once more Cardiff were skating on thin ice as Marshall almost pushed a pass to Maiga into the path of Nolan.
Stewart Downing arrived for his West Ham debut with 20 minutes left and he soon injected life into an increasingly lethargic home side by dashing forward with the ball.
He then teed up Nolan at the far post only for Ben Turner to intervene at the critical moment.
The Hammers finally produced their second with 15 minutes remaining when Noble launched a crafty run along the edge of the area before finding Nolan who expertly swept the ball into the net.
Cardiff substitute Nicky Maynard almost pulled a late goal back for the visitors, but he scooped his shot over the bar from close range after coming under pressure from James Collins.