Andre Ayew's brace took him into double figures for the season and Jack Cork added a beauty as Swansea, 2-0 ahead at the interval, ended a run of five straight defeats to Liverpool and claimed four successive top-flight home wins for the first time since 1982.
Christian Benteke, on as a substitute, gave Liverpool hope with his ninth goal of season, but defender Brad Smith's dismissal 14 minutes from time for two bookable offences ended the comeback
Liverpool manager Jurgen Klopp obviously had the Europa League semi-final second leg with Villarreal on his mind as he made eight changes from the side which had lost the first game in Spain on Thursday.
Only Nathaniel Clyne, Dejan Lovren and Philippe Coutinho remained and Swansea, one point from safety at kick-off, took advantage of the unfamiliar Liverpool line-up to clinch a sixth straight season of top-flight football.
This was Liverpool's first game on British soil since an inquest ruled on Tuesday that 96 of their supporters were unlawfully killed at Hillsborough in Sheffield 27 years ago.
The two captains, Ashley Williams and Martin Skrtel, laid wreaths before kick-off in front of the end housing Liverpool fans, and they were accepted by Barry Devonside, of the Hillsborough Justice Campaign.
Liverpool had scored 17 goals in their previous six away league games, but it was one-way traffic from the start as Swansea showed a sense of urgency which had been woefully lacking in their 4-0 defeat at Leicester seven days earlier.
Ayew, playing in an unfamiliar central striking role, was Liverpool's chief tormentor and the Ghanaian unselfishly set up Gylfi Sigurdsson for a 12th-minute shot directed straight at Danny Ward in the visitors' goal.
Liverpool had two further warnings from Ayew before he rose above Lovren to meet Sigurdsson's corner in the six-yard box for his ninth goal of the season, but his first since the end of January.
The Liverpool goal was under siege; Ward saving well from Cork with an outstretched right leg, Jordi Amat failing to convert with a close-range header and Jefferson Montero denied at the near post.
But Swansea's persistence was rewarded when Cork won possession in midfield and advanced to send a wonderful curled shot past Ward from 22 yards.
It was the midfielder's first goal of the season and only his second in 49 Swansea games, with his previous effort coming at Newcastle in April 2015.
Liverpool barely created a chance of note in the first period, although Daniel Sturridge went close with an opportunist chip on the run, and Klopp sent on Lucas and Benteke at half-time to try and remedy the situation.
Benteke made a positive impact when he shrugged off the attention of Sigurdsson at Sheyi Ojo's 64th-minute corner and headed home.
But Liverpool's hope was fleeting as Montero twisted and turned three minutes later to cause panic in the penalty area.
Ojo made a mess of controlling the loose ball and Ayew, who became the father of a baby girl on Friday night, found the bottom of the net to secure Swansea's first league win by a two-goal margin since August
TWEET OF THE MATCH
"Lucky I can fight a bit my boy just jumped up cheering liverpools goal" - Former world champion and Swansea fan Enzo Maccarinelli (@theRealEnzoMac) gave his son a talking to after celebrating Liverpool's goal.
PLAYER RATINGS
Swansea
Lukasz Fabianski: 7 (out of 10)
Angel Rangel: 7
Jordi Amat: 7
Ashley Williams: 7
Neil Taylor: 7
Leon Britton: 7
Jack Cork: 8
Wayne Routledge: 7
Jefferson Montero: 8
Andre Ayew: 9
Gylfi Sigurdsson: 8
Substitutes
Kyle Naughton (on for Montero 72mins): 6
Jay Fulton (on for Britton 90+1mins) 6
Liverpool
Danny Ward: 6
Nathaniel Clyne: 6
Martin Skrtel: 6
Dejan Lovren: 6
Brad Smith: 4
Pedro Chirivella: 4
Kevin Stewart: 5
Sheyi Ojo: 5
Jordon Ibe: 5
Philippe Coutinho: 5
Daniel Sturridge: 5
Substitutes
Lucas (on for Chrivella 46mins): 6
Christian Benteke (on for Coutinho 46 mins): 6
Cameron Brannagan (on for Ibe 80mins): 6
STAR MAN
ANDRE AYEW: Became a proud father on Friday when his daughter was born and he celebrated in perfect style
Lively from the start and put Swansea ahead with towering header
Reached double figures for the season when he rifled home his second to put Swansea back in control.
MOMENT OF THE MATCH
Jack Cork had not rippled the net since April 2015 when he netted in a 3-2 Swansea win at Newcastle
But the midfielder's long wait for a goal was worth it as he won possession and broke forward to send a tremendous curled effort past Liverpool goalkeeper Danny Ward
The delight on Cork's face said it all.
VIEW FROM THE BENCH
For Swansea head coach Francesco Guidolin, it is job done
The Italian was recruited in January to keep Swansea up and he has achieved that with two games to go
It was also the best performance of his reign
The ends will justify the means of this game for Liverpool manager Jurgen Klopp if his side overcome Villarreal in their Europa League semi-final on Thursday
Klopp chose to play a weakened side here and commentators will probably agree that he got what he deserved.
MOAN OF THE MATCH
As good as Swansea's first-half performance was, it was difficult to judge given the changes which Klopp had made
With the Europa League tie against Villarreal very much in Klopp's mind, he sent out a Liverpool side deprived of several regulars and one showing real inexperience in key areas
The result was perhaps entirely predictable against hosts motivated from the start.
WHO'S UP NEXT?
Liverpool v Villarreal (Europa League, May 5)
West Ham v Swansea (Premier League, May 7)
Source : PA
Source: PA