Clint Dempsey opened the scoring on the stroke of half-time and an own goal by Carlton Cole put them 2-0 ahead shortly after the restart.
Cole redeemed himself when he headed West Ham back into the game, but Fulham substitute Stefano Okaka put Fulham 3-1 in front from close range in the 79th minute.
An injury-time goal from Guillermo Franco was of little consolation to the visitors.
Fulham, with their fans in full voice, began the game in bright fashion but without striker Bobby Zamora their final ball left a lot to be desired.
Zoltan Gera, the hero of their Europa League semi-final triumph over Hamburg, was on the bench and they clearly missed his trickery and incisive passing in the early exchanges.
West Ham, although effectively safe from relegation, failed to offer anything in terms of attacking football.
Goalmouth incidents were at a premium in the opening 10 minutes although Fulham’s Erik Nevland and Clint Dempsey posed a threat to the visitors.
In the 21st minute Dempsey put Nevland in the clear but he did not have the pace to reach the ball before the onrushing West Ham goalkeeper Robert Green.
Fulham’s European success appeared to have sucked the life out of them although the fans quite rightly made the most of it, chanting “There’s only one team in Europe”.
Mark Schwarzer produced a fine save to prevent Mark Noble’s 20-yard shot from finding the net in the 23rd minute.
Dempsey was just the width of the woodwork away from opening the scoring in the 26th minute when his superb turn and shot from 20 yards hit the bar.
But it was an isolated moment of magic in a poor game. West Ham’s passing was disappointing and Fulham could not get into their stride.
In the 40th minute Manuel Da Costa forced Schwarzer into another fine save when the West Ham full-back managed to get some space 25 yards out.
The Fulham defence continued to back off Da Costa and he required no further invitation as he left fly from the angle of the penalty area, but Schwarzer dived to his left to keep the ball from finding the net.
Dempsey broke the deadlock when he collected a pass from Simon Davies in stoppage time and fired past Green.
Fulham made it 2-0 in the 58th minute when Carlton Cole put through his own goal.
Chris Baird’s shot was going well wide of the target until it smashed off the shoulder of the West Ham striker and into the net.
But Cole redeemed himself in the 61st minute when he glanced home a free-kick from Scott Parker to reduced the deficit.
The England striker cleverly managed to evade the home defence and gave Schwarzer no chance with a deft header.
Cole then tried his luck from 20 yards as West Ham took the game to the home side for the first time in the afternoon, but his low drive went straight into the arms of Schwarzer.
Fulham, rattled by West Ham’s response to going two down, tried to rediscover their earlier verve but the visitors now had the upper hand.
Parker almost got on the end of a knock down by Cole in the 68th minute but he was adjudged to have handled as he moved in on goal.
Fulham made it 3-1 in the 79th minute when Jonathan Spector was caught in possession by Nevland and he crossed for substitute Okaka to fire home from six yards.
Franco scored an injury-time consolation to make the score 3-2, smashing home from near the penalty spot after Scott Parker pulled the ball back.