The hosts should have been two up inside five minutes but Dwight Gayle could not control another fine pass from the Shelvey supply line, and the striker wasted another good chance after Mohamed Diame had pinched possession from Mario Lemina, dragging a left-footed shot straight at Alex McCarthy.
Gayle made amends by playing a role in Newcastle's second on 29 minutes, a flowing counter-attack also involving Ayoze Perez which ended in Chelsea loanee Kenedy tapping home from close range.
Perez glanced a free header onto the roof of the net and Kenedy shot wide in space from 15 yards, before Ritchie stroked a first-time shot into the bottom corner from Shelvey's 20-yard layoff on 57 minutes.
The Saints had a brief period on top as Guido Carrillo got across Jamaal Lascelles at the near post but failed to seriously trouble Martin Dubravka, and Ryan Bertrand nodded over when unmarked from a corner.
Dubravka also pushed away a bending shot from Sims in the final 15 minutes to preserve a second successive home clean sheet for Newcastle, who will be encouraged going forward in their relegation battle.
Southampton meanwhile are stuck in 17th with only one league win under their belts since November.
NEWCASTLE (4-4-2): Dubravka; Yedlin, Lascelles, Lejeune, Dummett; Ritchie, Shelvey (Merino, 83'), Diame, Kenedy (Atsu, 78'); Perez, Gayle (Joselu, 69')
SOUTHAMPTON (4-5-1): McCarthy; Cedric, Stephens, Hoedt, Bertrand; Lemina (Sims, 46'), Hojberg, Ward-Prowse, Tadic (Long, 46'), Redmond; Carrillo (Gabbiadini, 66')