The Swans suffered their first defeat in eight league games as Andy Carroll's header gave the home side all three points at Upton Park.
Sam Allardyce's men had the better of a goalless first half, but the visitors had Gerhard Tremmel to thank for keeping out efforts from Kevin Nolan and Ricardo Vaz Te.
The hosts continued to press after the interval as Tremmel saved well again from Mohamed Diame, but Carroll rose highest to score from Mark Noble's corner late on to hand the Hammers their first win in ten games.
The Swans made three changes to the side that drew with Sunderland on Tuesday.
Angel Rangel returned to the starting line-up in place of Dwight Tiendalli, while Ki Sung-Yueng partnered Jonathan de Guzman and former Hammer Leon Britton in midfield.
Itay Shechter dropped to the substitutes bench as Michu led the visitors' attack, and Nathan Dyer made way for Wayne Routledge.
Meanwhile, Michel Vorm was still sidelined with a knee problem so Gerhard Tremmel retained his place in goal, with Garry Monk and Luke Moore returning to the Swans squad to feature on the bench.
Andy Carroll made his first start since November for West Ham, with the on-loan striker partnering Ricardo Vaz Te in attack.
West Ham: Jussi Jaaskelainen, Joey O'Brien, James Tomkins, Winston Reid, Mark Noble, Kevin Nolan (Emanuel Pogatetz ,90), Mohamed Diame (Gary O'Neil, 86), Matt Jarvis (Joe Cole ,62), Matt Taylor, Andy Carroll, Ricardo Vaz Te.
Subs: Raphael Spiegel, Emanuel Pogatetz, Joe Cole, Gary O'Neil, Marouane Chamakh, Jack Collison, Carlton Cole.
Swans: Gerhard Tremmel, Angel Rangel, Chico Flores, Ashley Williams (capt), Ben Davies, Leon Britton (Luke Moore, 57), Jonathan de Guzman, Ki Sung-Yueng, Wayne Routledge (Nathan Dyer, 75), Pablo Hernandez, Michu.
Subs: David Cornell, Garry Monk, Dwight Tiendalli, Roland Lamah, Nathan Dyer, Itay Shechter, Luke Moore.
After a cagey opening from both sides, West Ham created the game's first chance after just five minutes as Matt Taylor's long ball was nodded down by Andy Carroll into the path of Kevin Nolan, but his shot was deflected behind for a corner.
Shortly after, Ricardo Vaz Te picked up the first booking of the afternoon for a late challenge on Wayne Routledge before Jonathan de Guzman had the Swans' first sight of goal with a free kick that drifted wide.
At the other end, Mohamed Diame tested Gerhard Tremmel's reflexes with a shot from 20 yards that the German keeper held comfortably.
And it wasn't long before the Swans stopper was called into action once more as Joey O'Brien turned Ben Davies on the right flank before delivering a superb cross for Nolan, but the midfielder's effort was brilliantly saved at point-blank range by Tremmel.
That seemed to galvanise the visitors, who then went on to have their best spell of the game so far as Pablo Hernandez turned Taylor inside out down the right channel before seeing his left foot shot blocked from six yards out.
However, it was the home side who again came closest to opening the scoring after 36 minutes as Carroll headed the ball into the path of Nolan and the midfielder struck a low effort that Tremmel did well to parry away to safety.
And the 33-year-old came to Swansea's rescue once more on the stroke of half time as he kept out a stinging drive from Vaz Te after the striker had cut in from the left flank.
Half time: West Ham 0 Swans 0
The Hammers began the second half with real purpose and Vaz Te continued his duel with Tremmel as he beat three Swans players before seeing his left foot shot held by the keeper.
And the home side had an even better chance on 52 minutes as Jarvis found space down the left and after cutting the ball back across the face of goal, Andy Carroll blazed his effort over the bar.
Michael Laudrup was then forced into his first change of the afternoon as Leon Britton came off after suffering a slight knock, with Luke Moore replacing him.
Pablo Hernandez then saw his free kick parried away by Jussi Jaaskelainen, before Carroll headed wide from a Jarvis cross at the other end.
That was the final act of the day for Jarvis, who was replaced by Joe Cole in West Ham's first change of the game.
The Swans then stepped it up a gear as Routledge played in Michu who fired over, before the Spaniard went even closer with a header that dropped a fraction over the bar after good work from Hernandez.
The game was now starting to open up and West Ham had two chances in quick successive in a bid to break the deadlock.
First, Carroll drew a smart save from Tremmel with a low drive inside the box, before Diame saw his half volley bounce into the ground and over the crossbar.
Laudrup then made his second change of the game as Nathan Dyer replaced Wayne Routledge with fifteen minutes left to play.
But it was the home side who made the breakthrough on 77 minutes.
Andy Carroll - a constant thorn in the Swans defence all afternoon - rose highest to head past Tremmel from Mark Noble's corner for only his second goal of the season.
The Swans came back strongly and after Ki saw his 20 yard effort parried by Jaaskelainen, Davies followed up but his shot was held by the keeper.
However, despite a late rally from Laudrup's men, the Swans fell to a narrow defeat to leave them on 34 points in the Barclays Premier League.