West Ham got their first victory of the season at Villa Park, thanks to Pablo Fornals’ deflected second-half goal.
Villa had a goal disallowed in the first half after Lucas Digne’s corner went out of play before Ezri Konsa put the ball in.
West Ham improved in the second half and had a chance to score when Jarrod Bowen burst away on the counter, but he was blocked by a well-timed Digne tackle.
But, with 16 minutes remaining, Fornals’ shot struck Konsa and looped over Villa goalkeeper Emiliano Martinez, kicking off the Hammers’ season.
West Ham moves off the bottom of the standings, level on points with Villa.
After a disappointing first-half performance, West Ham improved after the interval, with Bowen bursting away on the counter only to be halted by Digne’s last-ditch challenge.
Bowen’s chance appeared to give the visitors a boost, as Gianluca Scamacca – given his first league start by Moyes – fired straight at Martinez after being picked out on the outside of the box by Tomas Soucek.
The goal was unlucky, as Fornals’ long-range shot rebounded off Konsa and over Martinez, but with Villa unable to respond in the dying moments, Moyes will believe his team deserved to win.
West Ham’s success came only hours after it was revealed that they are on the verge of completing a £36.5 million deal to sign Lucas Paqueta from Lyon.
The Brazilian’s impending arrival, along with this crucial win, should provide the Hammers with a timely lift as they prepare to welcome Tottenham to the London Stadium on Wednesday before facing Chelsea on Sunday.