By Tom Mallows, BBC Sport
It was the Gunners' biggest Premier League away win and their joint-biggest margin of victory in an away league match since a 7-1 win over Aston Villa in December 1935.
It was the perfect follow-up to their 3-1 win over Liverpool last weekend and ensures they remain just two points behind Jurgen Klopp's side.
They also wiped out a six-goal deficit between themselves and Manchester City in second, meaning the champions remain above the Gunners only on goals scored in an increasingly tight three-way title race.
In contrast this was a deeply worrying performance for West Ham, who were perhaps fortunate not to lose by more goals.
It is their heaviest home Premier League defeat and joint-heaviest of all time, along with a 8-2 loss against Blackburn in 1963-64.
It also means they have failed to win any of their first seven games of a calendar year for the first time since 1997.
It will only increase the pressure on manager David Moyes, whose future is increasingly uncertain as he enters the final five months of his contract.