Hammers batter Burnley in FA Cup
German midfielder Thomas Hitzlsperger, playing his first game since joining from Lazio in June, gave the hosts an early lead and two neat finishes by Cole, a header from Winston Reid and a late strike from Freddie Sears sent the Hammers through to a last-eight clash at Stoke City.
West Ham goalkeeper Robert Green pulled off early saves from Burnley's Chris Eagles and Jay Rodriguez as the visitors started well but Hitzlsperger's fierce long-range strike in the 23rd minute settled the home side down.
Cole beat the offside trap twice in the opening minutes of the second half, scoring first with a left-foot poke after a poor touch and then with a curling effort from the edge of the box.
New Zealand defender Reid headed home Hitzlsperger's corner in the 59th minute before Rodriguez claimed a consolation for the Championship side.
Striker Sears smashed home a last-minute effort to complete a satisfying evening for the Upton Park faithful.
West Ham languish 19th in the Premier League standings but have enjoyed success in cup competitions this season with manager Avram Grant also leading them to the League Cup semi-finals.