Declan Rice was directly involved in three goals on his return to former club as Arsenal ended a three-match winless run against the Hammers in all competitions to move level on points and goal difference with second-placed Manchester City.
It was both West Ham's joint-heaviest home league defeat, and Arsenal's joint-largest away league win.
How the match unfolded
West Ham named the same team that lost 3-0 to Manchester United last weekend, while Arsenal made two alterations to their starting XI, with Leandro Trossard and Jakub Kiwior coming in for Jorginho and Oleksandr Zinchenko, with the latter missing out entirely due to injury.
Arsenal dominated from kick-off and after Trossard headed over the bar and had a volley saved by Alphonse Areola, the away side's pressure told as William Saliba headed in Rice's 32nd-minute inswinging corner.
Bukayo Saka was then brought down by Areola when through on goal, and after missing a spot-kick in last season's 2-2 draw at London Stadium, he stepped up and ensured history would not repeat itself as he sent the ball past Areola to give Arsenal a 2-0 lead in the 41st minute.
That goal was Saka's 50th for Arsenal in all competitions, as he became the fifth-youngest player to reach that figure for the club.
The goals kept coming for the Gunners as Gabriel made it 3-0 only three minutes later, heading in from another Rice set-piece, before Trossard fired in a fourth in the second minute of first-half stoppage time, netting for a second successive match.
Remarkably, Arsenal's 4-0 lead at half-time was the 60th time a Premier League team have led by this scoreline at the break, and the 20th time by an away side.
Only once had a team avoided defeat from 4-0 down at half-time in the Premier League, and it may have given hope to West Ham that it was done against Arsenal, by Newcastle United, in February 2011.
But West Ham soon found themselves 5-0 down, as Saka struck on 63 minutes when he cut inside and smashed the ball in at the near post.
Rice then marked his first league return to West Ham since leaving last summer with an incredible curling strike from 25 yards out into the top-left corner two minutes later.
The manner of Rice's strike was so impressive that it drew a brilliant reaction from Saka.
West Ham had no answers for Arsenal's attacking display and ended the match with only five shots, as they drop to eighth, with 36 points.
Next five Premier League fixtures
Gabriel has scored 14 goals for Arsenal in the Premier League, the most of any defender in the competition since the start of 2020/21. Overall, Laurent Koscielny with 22 is the only defender who has netted more goals for Arsenal in the Premier League than the Brazilian.
Arsenal registered their joint-biggest margin of victory in an away league match, and their first such win by six goals since December 1935 against Aston Villa (7-1). This was also their joint-biggest win in a London derby in league competition, with all three of those ending 6-0.
Rice assisted two goals in a Premier League fixture for the first time in his career, with today being his 228th match in the competition. With his second-half strike, it was also the first time he’s been directly involved in three or more goals in a Premier League match.
With Arsenal's 6-0 win at West Ham and Newcastle's 8-0 win at Sheffield United, 2023-24 is the first English top-flight season to see two separate 6+ goal victories by away sides since 1959-60 (Man Utd 6-0 Blackpool & West Brom 7-1 Birmingham City).