Ronald Koeman's men had the better of possession and peppered the visitors' goal throughout, but it was Garry Monk's side who emerged victorious.
Shelvey capitalised on Saints' futility in front of goal, firing home from distance with seven minutes remaining as Swansea triumphed 1-0 - their first league win since Boxing Day.
Things could have been so different had Lukasz Fabianski not reacted quickly to deny James Ward-Prowse a first ever league goal in the opening 10 minutes - the hosts' best chance of a one-sided first half.
Swansea had to defend impressively to keep Saints at bay but were coming close on their rare forays forward, with Bafetimbi Gomis hitting a half-volley just wide and Shelvey hitting the post.
They were warning shots Southampton failed to heed as Shelvey made space to fire home from distance in a frantic end to the match, with Ryan Bertrand sent off for a nasty challenge on Modou Barrow after Ashley Williams made two goal-line clearances in quick succession to deny Sadio Mane.
The Swansea captain was one of six changes Monk made after last weekend's FA Cup exit to Blackburn, although Jack Cork, signed on Friday from Saints, was not registered in time to feature.
The midfielder instead watched from the stands at St Mary's, where his former club went close to a seventh-minute opener.
The ever-impressive Nathaniel Clyne sent in a low cross which Ward-Prowse looked to have turned in until an excellent, instinctive save from Swansea goalkeeper Fabianski.
Saints were bossing possession and threatening an early goal, which, rather surprisingly, almost came at the other end when Shelvey flicked into the path of Gomis, whose left-footed half-volley flew just wide.
Swansea were struggling to get the ball off Saints, though, and were hit by an early injury to Marvin Emnes, leading to Barrow's introduction after 15 minutes.
A Gomis effort from an offside position shortly after was all the Swans could muster for the remainder of the first half as Saints pushed for a deserved opener.
Harrison Reed and Bertrand had admittedly poor efforts, before Graziano Pelle and Dusan Tadic were squeezed out under pressure.
Swansea were having to defend manfully as low crosses were drilled in, with Williams having to turn behind his own goal as Tadic all too easily shook off Jay Fulton.
Eljero Elia, impressing on the left flank, had an effort blocked and continued to cause havoc with his crossing, but the scoreline was goalless at the break.
Play continued the same way after the interval, with Saints on the front foot without creating clear-cut opportunities.
There were now, though, a few glimpses of life from the visitors
Fraser Forster was fortunate that Neil Taylor did not take advantage of a hashed clearance shortly, before Shelvey was allowed time to run through and send a low, fizzing strike which hit the post.
Ward-Prowse had a header and low drive saved when Saints returned to the attack, while substitute Mane saw a dangerous cross saved after Jose Fonte was blocked.
An Elia cross agonisingly bobbled along the six-yard box without being converted as Saints pushed for a breakthrough which would eventually come from the visitors.
Shelvey showed good composure to get the ball out of his feet and lash home a fizzing strike from 25 yards in front of the visiting fans.
It was a sucker-punch Saints tried to recover from, only for skipper Williams to produce two goal-line clearances in quick succession to prevent Mane levelling.
Pelle smashed over in stoppage time - epitomising the frustration which boiled over when Bertrand was sent off for hacking down Barrow, which saw the substitute leave the field on a stretcher.
Source : PA