Defeat for Leeds was their first in three league matches, but they still sit 15th, seven points clear of the drop zone heading into the international break.
Story of the match
Mateusz Klich's shot flashed across the six-yard box before Raphinha fired just over the crossbar after getting to the edge of the box.
The only shot on target for the visitors nearly resulted in the opening goal as Shelvey saw his volley from the edge of the area pushed away by Whites goalkeeper Ilian Meslier.
Newcastle finally found the breakthrough with quarter of an hour to go. Javier Manquillo completed a splendid run down the left before he was fouled.
Shelvey took the free-kick and curled his shot past Meslier and into the bottom-left corner.
The visitors looked to double their advantage as Allan Saint-Maximin teed up Fraser, who went wide of the right-hand post and Meslier saved from Willock.
Leeds looked to attack in the closing stages, but the Newcastle defense held firm to pick up a first away win since May.
Man of the match: Jonjo Shelvey
Scored the crucial goal that gave Newcastle the victory, but he went close before that and controlled the midfield well, especially in the first half.