The Swans dominated from the off with goals from Wayne Routledge and Andre Ayew with good chances from Angelo Ogbonna and Manuel Lanzini coming from the home side but couldn't turn around the deficit in the first period.
It was over early in the second half with Sung-Yeung Ki adding a third, Slaven Bilic's side were given a glimmer of hope with a Stephen Kingsley own goal but a injury-time strike from Bafetimbi Gomis sealed a miserable afternoon in East London.
Leave on a high
The Hammers were looking to leave Upton Park on a high in their penultimate game at the ground and got off to a bright start as Dimitri Payet looked to curl the ball beyond the reach of Lukasz Fabianski but the Pole did well to tip the effort wide and collect Winston Reid's header from the subsequent corner.
Payet has become known for his free-kick abilities over the season and had two great opportunities from the dead ball situation to give his side the lead in quick succession however both times the efforts went just wide of the mark.
After the great opportunities from the Frenchman, Francesco Guidolin's side took over and managed to exploit the poor defending of their hosts taking the lead in the 24th minute. It proved simple for the Swans as Ki floated a ball over the top to Kyle Naughton who laid it on a plate for Routledge who tapped into a empty net.
Ogbonna had an excellent opportunity to instantly reply when Fabianski's failed punch fell at the feet of defender but with a open goal to aim at he managed to send it well over the crossbar.
The former Juventus man was made to pay for his wasted opportunity as the Swans doubled their lead on the half-hour mark. Again they capitalised on the Hammers' poor defending as Stephen Kingsley whipped in a excellent cross in from the wing to miss the reach of the defender and fall onto the foot of the sliding Ayew who made no mistake from four yards out.
The home side needed a goal before the break to boost morale for the second period and almost had it when Lanzini was given a second bite of the cherry having initially missed the ball across the face of goal when Andy Carroll knocked it back across but he could only clip it over the bar.
Sign, sealed, delivered
The three points were confirmed for Swansea just six minutes after the restart as they managed to grab a third goal of what had been an excellent attacking performance. It was simple enough as Modou Barrow whipped the ball in and Ki did well to compose himself to place the volley into the bottom corner.
Once again West Ham were handed a instant opportunity to reply when the ball fell well for Michail Antonio but Fabianski did well to block the effort with his legs.
Glimmer of hope
Despite the points been seemingly beyond Bilic's side they were given a slight glimmer of hope when they managed to get on the scoresheet.
Initially it looked like Fabianski had produced some brilliance as he denied both Antonio and substitute Diafra Sakho but failed to keep out Sakho who followed up the effort with a deflection from Kingsley taking it in.
It was nearly four for Swansea when Antonio clattered his own crossbar but the Swans eventually sealed a fantastic win with another great counter-attack.
Gomis had been on the field a little over ten minutes when he charged down the pitch towards Darren Randolph playing in Ayew who returned the favour and the Frenchman made no mistake firing into an empty net.