Kasper Schmeichel saved early headers from Dwight Gayle and Ayoze Perez.
But he was beaten on 18 minutes when Perez teed up Shelvey to score from 18 yards.
Wes Morgan headed wide from Riyad Mahrez’s cross but Perez made it 2-0 with a long-range lob over Schmeichel following a mix-up between Morgan and Harry Maguire.
Jamie Vardy prodded in Shinji Okazaki’s knock-down for his fourth goal in as many PL matches on 84 minutes.
But Newcastle held on and move up to 10th place with 38 points after a third straight league win.
Leicester are five points and two places better off.
Leicester: 14 Apr v Burnley (A)
Newcastle: 15 Apr v Arsenal (H)