Dean Ashton headed the Hammers level but was then twice denied by acrobatic saves from Cottagers goalkeeper Antti Niemi, who brilliantly deflected one close-range strike on to the bar and then dived to palm away another.
But there was nothing the Finnish goalkeeper could do to stop Ferdinand's first-time shot into the roof of the net which sealed a valuable home win for West Ham.
Manager Alan Curbishley said: "We didn't start so well and Anton copped it at half-time. I wasn't happy with how he and Matthew Upson started.
"But they came out to put it right. We wanted to cement our position in the top half and this was a big result for us."
Once West Ham settled and began playing a faster brand of attacking football - rather than relying on long balls forward - Ashton looked increasingly dangerous.
And Freddie Ljungberg enjoyed arguably his best game for West Ham, testing the Fulham rear-guard with a series of excellent crosses from the right.
"We feel if we can give Ashton the chances he will take them. Niemi made a fantastic save to deny him," said Curbishley.
"He is trying to get fit in the first team and it is a case of him getting a bit sharper and us playing better to give him the chances.
"Today we felt that if we could get the ball into the box we would cause them problems. "We had one cleared off the line from Carlton Cole and Niemi has made a couple of saves. I think we created the better chances."