The hosts were on course to break their home curse and potentially rise out of the relegation zone thanks to a Jay Rodriguez penalty, but Dara O'Shea's own goal preceded an injury-time Tomas Soucek winner as the Hammers snatched the unlikeliest of victories from the jaws of defeat.
Owing to the knee problem which forced him to withdraw from the England camp, Jarrod Bowen was nowhere to be seen for West Ham, who called upon Danny Ings to lead the line in his place against an unchanged Clarets side.
Moyes's men could have done with a dash of Bowen inspiration in a forgettable first half, where Burnley just edged the possession and shot statistics, and the Irons only had one shot on target to write home about.
That effort came with just two minutes gone, as James Trafford comfortably held onto Tomas Soucek's fluffed lob after the Czech midfielder had been slipped through by Lucas Paqueta, but the Burnley number one was a mere spectator thereon in the first half.
With 28 minutes gone, the lively Luca Koleosho forced Alphonse Areola into a strong save from a tight angle, and the 19-year-old then wanted a penalty after seemingly being caught by the leg of Vladimir Coufal.
Despite a brief VAR check, Koleosho and Vincent Kompany's fell on deaf ears before the two teams headed into the changing rooms with their clean sheets intact, but West Ham's shut-out would be wiped out four minutes after the restart.
Justice was served from a Burnley point of view, as Mohammed Kudus was adjudged to have trodden on Koleosho's foot inside the area, and Rodriguez calmly stroked the resulting penalty into the middle of the goal and Areola dived to his left.
After a drab first half, Rodriguez's opener breathed new life into the clash of the Clarets, as Zeki Amdouni, O'Shea, Paqueta and James Ward-Prowse all let fly without success during a chaotic few minutes just before the hour mark.
However, Kompany's men looked relatively comfortable with a one-goal lead and could have extended their cushion in the 74th minute as Jacob Ramsey beat the offside trap, but his effort was high and not very handsome.
West Ham refused to go down without a fight, though, and Paqueta curled a powerful strike just past the post 10 minutes later, but it was one of Moyes's substitutes who would help to get the Europa Conference League winners back on level terms.
It was no surprise to see the fleet-footed Kudus involved, as the Ghanaian strode past several Burnley shirts and got to the byline before cutting back for Divin Mubama, whose near-post flick hit O'Shea and nestled into the back of the net; the Burnley defender was credited with the own goal in the 86th minute.
Only a few moments later - after seven minutes of added time had been signalled by the fourth official - Kudus proved too hot to handle on the right yet again, and the ex-Ajax man swung a ball into the box, where Soucek peeled away at the back post and crashed a volley into the back of the net to send the away end into pandemonium.
In front of crestfallen Turf Moor faithful and dumbstruck Kompany, Burnley had no response to the Soucek-sized sucker punch as they remained bottom of the table with seven defeats from seven home games, while the Hammers stay ninth owing to Brighton & Hove Albion and Newcastle United's wins over Nottingham Forest and Chelsea respectively.
A crucial basement battle with Sheffield United now awaits Burnley on December 2, while West Ham travel to Serbia to meet Backa Topola in Thursday's Europa League contest.