Premier League: Southampton 0 Swansea 1
The midfielder settled a low-key affair in the 83rd minute when he took aim from 25 yards and arrowed a shot into the top right-hand corner, before Southampton lost Ryan Bertrand to a straight red card in the closing stages for a dangerous challenge on Modou Barrow, who had to be carried from the field on a stretcher.
Shelvey had earlier struck the left-hand post with a low drive, but that was a rare threat for Swansea as Southampton dominated the ball for much of the encounter.
For all their possession, however, Southampton's best chance saw James Ward-Prowse superbly denied by Lukasz Fabianski inside the opening 10 minutes, as Ronald Koeman's side fell to a first Premier League defeat in seven.
Victory marked Swansea's first in the Premier League over the south coast club, and also ended a four-match winless streak in the league.
Southampton miss out on the chance to climb back above Manchester United into third, while Swansea's win sees them move up a place to ninth at the expense of Stoke City.
Koeman made one change from Southampton's previous league outing as Maya Yoshida replaced Florin Gardos, who came in for criticism from his manager for his first-half performance in the 3-2 FA Cup defeat to Crystal Palace last weekend.
Swansea made four alterations to the side thumped 5-0 by Chelsea last time out in the league, including a debut for Kyle Naughton following his arrival from Tottenham and a first Premier League start of the season for Jay Fulton.
The home side began brightly and ought to have gone ahead in the seventh minute, but Ward-Prowse was superbly denied from eight yards out by the right boot of Fabianski.
Swansea threatened for the first time six minutes later as Bafetimbi Gomis received a pass from Shelvey and fired an effort narrowly wide of the left-hand post.
Gomis then lost strike partner Marvin Emnes to injury as the latter gingerly walked off to be replaced by Barrow.
Dusan Tadic was unable to get a telling touch to Eljero Elia's teasing cross on the half-hour mark as Southampton continued to look the most likely to break the deadlock.
Ten minutes after the interval, Shelvey came agonisingly close to putting the visitors in front when he drove into space and hit a lot shot which defeated Fraser Forster but struck the left-hand upright and rebounded to safety.
Ward-Prowse then brought two comfortable saves out of Fabianski with a weak header and a shot from the edge of the box as a turgid affair threatened to burst into life.
With seven minutes remaining, Shelvey picked up a pass from Barrow and fired a sweetly-struck shot into the top-right corner, with Forster's touch not enough to keep the ball out.
Swansea were grateful to Ashley Williams for twice clearing efforts off the line from Southampton replacement Sadio Mane, before Bertrand's frustration got the better of him, leaving referee Michael Oliver with no choice but to brandish a red card.