Two goals just after the break from their new look front two, Diafra Sakho and Enner Valencia, were added to by substitute Carlton Cole – all with headers.
The hosts pulled a goal back through George Boyd with his first goal for the club to put the game back in the balance, but in the end the Hammers were good value for their win.
Allardyce, once the manager of Burnley’s bitter rivals Blackburn, is staying in the north-west to celebrate, and will do so in good spirits after the victory lifted them, at least temporarily, into the top four in the Premier League, while Sean Dyche’s side are still searching for a first win back in the top flight.
Burnley came close in the fifth minute, Boyd controlling Kieran Trippier’s deflected cross and firing a brilliant left-footed volley against the underside of the bar.
Lukas Jutkiewicz did have the ball in the net three minutes later but the former Middlesbrough man was denied a first Burnley goal, correctly, by an offside flag.
Danny Ings had created the opening with a jinking run into the box and shot that was fumbled by Adrian into Jutkiewicz’s path.
It was a frustrating 10 minutes for Jutkiewicz, who then headed Trippier’s cross over the bar before being unable to capitalise after two West Ham defenders fell over in the area.
The Hammers had not got going, and Allardyce was unimpressed with Sakho, who appeared more concerned by an impending challenge from Jason Shackell than Aaron’s Cresswell’s fine cross and headed well wide from close range.
The classy presence of Boyd in midfield had caught the eye and more trickery from him on the half-hour mark created another opening for Burnley.
Michael Kightly looked poised for a free header from Boyd’s cross at the far post but Jutkiewicz took the ball away from his team-mate, leaving Kightly with head in hands.
There was a narrow escape for the hosts down the other end as Stewart Downing cut inside on the right of the area and curled a shot against the far post.
Dyche would have been encouraged by his side’s first-half display but frustrated they could not make the most of their superior chances.
And they were made to pay four minutes into the second half when Cresswell curled over a superb cross and Sakho, this time with his eyes firmly on the target, headed in.
Five minutes later it was 2-0, Carl Jenkinson the architect from the right this time and Valencia applying the finishing touch with a fine header from 10 yards.
It was very nearly three as Cole – on for Valencia – got his head to a corner only to see it cleared off the line by Kightly, and from there Burnley went down the other end and pulled one back.
Ings won a corner and then made a nuisance of himself as Adrian tried to collect the cross, allowing Boyd to slam the ball home. Adrian appealed for a free-kick but the blame appeared to lie squarely with him.
It was the boost Burnley needed and they almost drew level immediately but Ings’ header from Trippier’s cross flew agonisingly wide of the far post.
However, West Ham did a good job of seizing back the momentum and quietening the crowd and, with 20 minutes to go, they restored their two-goal advantage.
It was another cross that undid Burnley, Noble’s corner picking out Sakho, who headed across the six-yard box for Cole to nod in.
Downing almost added a fourth with a rasping shot that flew just wide, while Cresswell poked a shot straight at Heaton.
Burnley’s afternoon was rather summed up three minutes from time when the excellent Trippier crossed for substitute Ashley Barnes to slam a shot against the bar.