Early goals by Alan Lee and Joe Ledley set up Cardiff for a convincing win.
McAnuff was in inspired form against his former club
Paul Parry crossed for Lee to shoot home from close-range, then Jobi McAnuff's deep ball set up Ledley who produced a fine far-post finish.
Gary O'Neil had his shot turned on to the bar for the home side before Parry made it 3-0 with a precise finish.
Marlon Harewood pulled one back from the spot after he was fouled by Graham Kavanagh but McAnuff finished off a fine move to seal Cardiff's victory.
Cardiff boss Lennie Lawrence:
"I'm delighted that the goals were shared out because in the past we have relied on just one player to score.
"All over the field we did well and that was one of the best performances I have had from the players since I have been here.
"If you are struggling at home then this is a hard place but when you win and
play well the crowd are fantastic."
West Ham manager Alan Pardew:
"If you give any side a two-goal start you end up with an uphill struggle.
"We had chances to get back in the first half but didn't take them and we have been convincingly beaten.
"This is always a tough fixture but we didn't expect this sort of result."
Cardiff: Warner, Williams, Gabbidon, Collins, Barker, McAnuff, O'Neil (Boland 90), Kavanagh, Ledley, Lee, Parry (Jerome 85). Subs Not Used: Weston, Bullock, Alexander.
Goals: Lee 3, Ledley 16, Parry 54, McAnuff 77.
West Ham: Bywater, Repka, Mullins (Rebrov 73), Davenport, Brevett (Powell 73), Chadwick (Hutchison 52), Lomas, Fletcher, Etherington, Harewood, Zamora. Subs Not Used: Walker, Ferdinand.
Goals: Harewood 69 pen.
Ref: R Beeby (Northamptonshire).