Rafael Benitez's side, who had only once before gone past the fourth round of a domestic cup competition during owner Mike Ashley's tenure, dominated from the off, but were helped in no small part by North End midfielder Alan Browne's 25th-minute dismissal for an ugly challenge on Jack Colback as they extended their unbeaten run in all competitions to eight games.
The teams, which featured a total of 16 changes in front of a crowd of 49,042 at St James' Park, meet again at Deepdale in the Sky Bet Championship on Saturday, when Preston boss Simon Grayson will expect much, much more.
It took Newcastle, who also hit the woodwork three times, just 19 minutes to get their noses in front when Mitrovic ran on to Ritchie's inviting free-kick to power a header past the helpless Anders Lindegaard, and Preston's task started to assume near-impossible proportions when they were reduced to 10 men.
Quite what Browne was trying to do when he felled Colback with a forearm smash as the pair challenged for a high ball, only he will know, but referee Andrew Madley had no choice but to produce a red card.
Diame took the game further away from the visitors seven minutes before the break when, after Mitrovic's attempted pass to Christian Atsu was deflected into his path, he drilled a long-range shot past the helpless Lindegaard.
The Magpies killed the game off within eight minutes of the restart when Ritchie picked himself up after being dumped inside the penalty area by defender Bailey Wright and converted from the spot despite Mitrovic's pleas for the ball.
However, the Serb had to wait just two minutes more for a chance to double his tally when he controlled a cross expertly on his chest before nimbly side-stepping two defenders and Lindegaard to blast into the empty net, ripping his shirt off in celebration.
Diame smashed home a fifth at the end of a scintillating 87th-minute move and Perez a sixth in stoppage time to make it a night to forget for the visitors.