Arsenal rose above Manchester City and Liverpool with the comprehensive victory, while West Ham will be looking over their shoulders towards the relegation zone as they sit just one point from safety and may drop into the bottom three on Monday if Hull beat Middlesbrough.
The Gunners took the lead midway throught the first half following a mistake from West Ham defender Angelo Ogbonna. The defender's loose pass went straight to Alexis Sanchez who went through on goal and squared for Mesut Ozil who scored with a simple finish.
Arsenal had their second and Alexis Sanchez's first when the Chilean broke into the box, firing his effort past Darren Randolph.
Sanchez didn't have to wait long for his second, scoring with a strike from 20 yards less than 10 minutes later, but West Ham themselves responded immediately.
The only positive for the Hammers would be that Andy Carroll scored on his return from injury, heading in a rebound from a Dimitri Payet free-kick that had hit the crossbar.
Two minutes after Carroll's consolation goal, Arsenal restored their three goal lead when Alex Oxlade-Chamberlain curled in a wonderful effort from 25 yards.
Alexis Sanchez then completed his hat-trick when he raced clear of the West Ham defence and clipped over Randolph to round off a successful afternoon for the Gunners against their London rivals.