Chris Wood opened the scoring for Burnley in the 15th minute before Dwight McNeil added a second in the 34th minute on his second ever start for the Clarets.
Wood continued his hot run of form against West Ham United, scoring in all four of his Premier League appearances against the Hammers.
This was Burnley's first-ever season in the UEFA Europa League and they had to start their season earlier than most in July 2018.
The Clarets were struggling with the fixture congestion and this led to Burnley sitting in 18th place, just inside of the relegation zone.
Burnley were in 17th place when they won 1-0 against Brighton & Hove Albion on 8 December 2018 but the Clarets lost their next three games against Tottenham Hotspur, Arsenal and Everton.
The Hammers had started the season well and looked like they could compete for the Europa League places. West Ham were in 9th place, just five points outside the top six.
Sean Dyche made five changes to the team that lost 5-1 to Everton on Boxing Day. Tom Heaton, Phil Bardsley, Johann Gudmundsson, McNeil and Wood came in for Joe Hart, Matt Lowton, Jeff Hendrick, Ben Gibson and Sam Vokes.
The line-up consisted of Heaton, Bardsley, Ben Mee, Tarkowski, Charlie Taylor, Gudmundsson, Kieron Westwood, Jack Cork, McNeil, Wood and Ashley Barnes.
Burnley came straight out of the blocks as soon as the kick-off whistle was blown.
Westwood gathered the ball in midfield and chipped a delicate ball to Barnes who chested it down for Wood to half-volley at the near post.
The Clarets were completely in control and they added a second, just under 20 minutes later.
Tarkowski dinked the ball to the back post finding McNeil who thought he ruined his chance but Westwood crossed the ball back into the box for McNeil to volley home at the neat post.
Two first-half goals were enough for Burnley as West Ham failed to mount a comeback with their lacklustre performance punished by the Clarets.
What happened next?
A man of the match performance from Westwood inspired Burnley to end their losing run.
After the win against West Ham, Burnley went unbeaten for seven more games with their amazing run coming to an end against Newcastle United on 26 February 2019.
The Clarets finished the season in a lowly 15th position but they secured another season in the top-flight when many doubted them in the new year.
Burnley are now in their fourth consecutive season in the Premier League which is a great achievement considering that they were relegated in their first season in 2009/10 and 2014/15.