Chelsea dominated for long periods but made too many mistakes at both ends and paid the price with three minutes left as Masuaku‘s miscued cross somehow found its way past Edouard Mendy.
It was the Blues’ first defeat in their last 13 games in all competitions and their spell at the top of the Premier League might be over by Saturday evening.
They are just one point ahead of second placed Manchester City, who visit Watford later on Saturday, with third placed Liverpool also able to go above Chelsea if they win at Wolves.
Fourth placed West Ham once again showed their ability to make life uncomfortable for the big guns.
The Hammers had already ended Liverpool’s long unbeaten run this season, as well as knocking Manchester City and Manchester United out of the League Cup.
Now Chelsea have joined the list of star-studded teams driven to distraction by Moyes’ well-drilled side.
After admitting Chelsea rode their luck to beat Watford in midweek, Tuchel will be concerned at another unusually disjointed display from the European champions.
Reece James has been in superb form of late and Chelsea’s right wing-back tested Lukasz Fabianski with a 20-yard drive before providing the cross that Kai Havertz headed straight at the Hammers keeper.