Frederic Piquionne was also on target as the Hammers came from behind to temporarily haul themselves off the foot of the table.
Cole netted twice after being inadvertently played in by Dickson Etuhu and Aaron Hughes at a chilly Craven Cottage, easing the pressure on manager Avram Grant.
The heat is now well and truly on opposite number Mark Hughes, whose side threw away namesake Aaron’s first goal for more than six years.
The Cottagers boss left the field to chants of “Hughes out!” after earlier enduring taunts of “You don’t know what you’re doing!”
Grant’s own pre-match desperation was summed up by Freddie Sears being handed his first Premier League start since March 2009 in one of five changes for the visitors.
The 21-year-old striker, recalled early from a loan spell at Scunthorpe, had scored just one goal in his entire 71-match professional career.
But, playing down the right, he made an immediate impact with a decent cross for the recalled Cole, who was under good pressure.
The striker also dragged wide from a tight angle before the visitors reminded their fans just why they were rock bottom in the 11th minute.
The fit-again Robert Green palmed behind a Carlos Salcido shot that was going wide and the visitors failed to clear the resulting corner, allowing Simon Davies to cross for the unmarked Hughes to nod home.
Recalled Fulham forward Andrew Johnson tested Green from distance two minutes later and should have doubled the hosts’ lead in the 18th minute when he failed to connect properly with Davies’ cross from six yards.
Fulham continued to dominate and even began playing keep ball as the half progressed but gifted their toothless opponents an equaliser with eight minutes remaining.
Sears’ weak cross was intercepted by Dickson Etuhu but the midfielder could only divert the ball straight to Cole, who stretched to angle it beyond the onrushing Mark Schwarzer from six yards.
Cole should have made it 2-1 when he shot straight at the goalkeeper after being put through one on one with a minute remaining.
But Piquionne incredibly put the visitors ahead in stoppage-time when he arrived completely unmarked to volley in Scott Parker’s cross.
Matthew Upson picked up the game’s first yellow card early in the second half for tripping Clint Dempsey.
But the free-kick came to nought and West Ham should have scored themselves in the 52nd minute but another heavy touch from Cole let him down.
Fulham boss Hughes withdrew Dempsey and Etuhu for Damien Duff and Eddie Johnson a minute later, a change greeted by some fans with chants of: “You don’t know what you’re doing!”
Green beat Andrew Johnson to John Pantsil’s cross as the hosts searched for an equaliser but the latter then got himself booked after bringing down Stanislas.
Only a desperate clearance from Brede Hangeland prevented Cole turning in Parker’s 64th-minute cross, and Sears sent a shot on the turn wide moments later.
Hangeland then played a defence-splitting pass to Andrew Johnson but Green was off his line in a flash to block the forward’s finish.
Junior Stanislas had an effort deflected behind in the 71st minute before another calamity befell Fulham two minutes later.
Hughes tried to cut out a long ball forward but only succeeded in nodding straight to Cole, who fired a superb angled drive across Schwarzer.
Eddie Johnson forced a superb fingertip save from Green trying to pull a goal back and Danny Murphy should have done better than blazing over Duff’s cross.
With time running out, Andrew Johnson was unable to get enough power on a shot on the turn.
But Fulham were already beaten and West Ham had the luxury of making a late change when Frank Nouble came on for Piquionne before the chants of “Hughes out!” began.