An early goal from Ayoze Perez put the Magpies on course for promotion to the top flight, but their party was quickly put on hold when Jordan Hugill grabbed a deserved equaliser for the visitors just seven minutes later.
However, Christian Atsu's late first-half strike sent the hosts into half time with the lead before second-half goals from Matt Ritchie and Perez - after Preston's Paul Gallagher had been sent off - saw Newcastle pick up the win they needed to book their place back in the Premier League.
Preston went into the match having conceded a league-low three goals inside the opening 15 minutes of matches this season, but that did not stop Newcastle from making a quick start and they could have broken the deadlock even before their seventh-minute opener.
Aleksandar Mitrovic - scorer of four goals against Preston already this season - almost capitalised on an early error from Chris Maxwell after the ball had bounced over the Preston keeper's head, but he couldn't steer his header into the empty net from a tight angle.
The Serbian striker then curled an effort narrowly wide from just outside the area which took a deflection on the way through, and it was from the resulting corner that Newcastle got the early goal they were after.
The initial delivery was flicked onto the back post where Ciaran Clark prodded it towards goal, but the final touch came off Perez and the Spaniard wheeled away in celebration to claim the goal.
Any thoughts that the early goal would be the start of a procession towards promotion were quickly put on hold, though, as Preston fought back and should have levelled things up just five minutes after falling behind when Daniel Johnson was released clean through on goal only to fire his effort straight at Rob Elliot.
Paul Huntington then nodded over from the resulting corner, but Preston would not have to wait much longer to restore parity as Hugill flicked an improvised finish past the Newcastle keeper at the end of a ruthless counter-attack.
After an action-packed start the match suffered a lull as Preston's revival silenced the St James' Park crowd, but they were back in full voice again when Atsu restored their lead just before half time.
Isaac Hayden won possession in midfield and launched a counter-attack that eventually saw Mitrovic tee up an unmarked Atsu inside the area, and the winger kept his composure to stroke a finish into the bottom corner.
That goal eased the tension inside St James' Park, and Newcastle almost made a dream start to the second half too when Perez benefited from a defensive error, only to then be denied by Maxwell from inside the area.
Preston's threat on the counter-attack left Newcastle knowing that a third goal would probably be needed, and Mitrovic sent one effort bobbling just wide before Maxwell was called upon again to deny Hayden as the Magpies went in search of that two-goal cushion.
Ritchie then wasted another good opportunity by turning down the chance to shoot with his weaker right foot, but the Scotland international was given the chance to atone for that from the penalty spot moments later.
A brief goalmouth scramble resulted in Gallagher deliberately handling the ball on the line to prevent a certain goal, leaving referee Andy Madley no option but to point to the spot and show the Preston midfielder a straight red card.
Ritchie stepped up to take it and kept his nerve to tuck his finish into the bottom corner from 12 yards with just 25 minutes remaining.
If that wasn't enough to all but secure Newcastle's place in the Premier League then Perez took away any semblance of doubt with his second of the night just three minutes later - albeit in fortuitous circumstances.
Jonjo Shelvey's whipped corner was not dealt with by Preston and ended up hitting the post via a deflection before bouncing against an unwitting Perez and over the line from close range.
At that stage it looked as though there were more goals in it for the Magpies if they pushed for it, but Rafael Benitez's side seemed content with the 4-1 scoreline and both Mitrovic and Yoan Gouffran missed opportunities to extend their lead in the final 20 minutes.
That did not make the full-time celebrations any quieter, though, as Newcastle moved nine points clear of third-placed Reading with just two games of the season remaining, as well as closing the gap on leaders Brighton & Hove Albion to four points.
Preston, meanwhile, remain in 11th place but have now lost their last four matches - their worst run of form since January 2011.