Two goals from Mark Noble and one each by Felipe Anderson and Sebastien Haller gave the Hammers the win.
Moyes saved the club from relegation during a six-month stint in 2017/2018 and replaced Manuel Pellegrini at the helm on Sunday.
On Wednesday, he led West Ham into producing arguably their best performance of what has been a patchy season.
Noble fired the home side ahead with a deflected 17th minute shot from 20 metres.
Haller doubled their lead with a spectacular goal eight minutes later, blasting in a Ryan Fredericks cross with an acrobatic volley.
Noble rounded off a perfect first half for West Ham with a 35th minute penalty kick, sending goalkeeper Aaron Ramsdale the wrong way.
The penalty kick was awarded after he was fouled by Harry Wilson as he muscled his way past the Bournemouth forward.
Anderson added the fourth midway through the second half as he shook off his marker and slid the ball under Ramsdale.
A VAR check later rescinded a red card for West Ham defender Aaron Cresswell, who was instead booked for a poor tackle.
The result lifted West Ham to 16th in the standings on 22 points from 20 games.
Eighteenth-placed Bournemouth, who have 20 points, dropped into the relegation zone after suffering their eighth league defeat in the last 10 games.