Coming from a goal down, the Hammers eventually won the 2-1 thanks to a brace from Michail Antonio.
It is a huge game in the context of the season as Moyes' side now move to within three points of fourth-placed Chelsea.
Speaking after the game, Moyes said: "We played really well. We're a different team now with a different mentality and I think the players showed that in abundance.
"Their football was terrific but so was their character. They showed they wouldn't be pushed around and be 'Burnleyed', if you want to call it that, because you can come here and Burnley can really do you in.
"I remember coming here when I was out of work after I left the job the first time and watched Burnley batter us a year or so ago, but that wasn't the case tonight."