For basement boys Peterborough, a third successive league defeat means they have just three wins from 27 games and are nine points adrift of safety.
Earlier in the day, Posh chairman Darragh MacAnthony launched an astonishing attack on his own team and branded their season so far "a disaster".
Having claimed back-to-back promotions, Posh have struggled in the second tier and they face a big fight if they are to preserve their Championship status.
But they made a bright start and Chris Whelpdale, restored to the starting line-up, had two efforts at goal inside the opening seven minutes but failed to find the target on either occasion from 25 yards.
The home side continued to press and Aaron Mclean forced a save from Andy Lonergan, who parried the striker's header from George Boyd's cross.
Boyd, with 12 goals to his name this term, then fired wide from 20 yards before lashing another effort off target as Posh dominated.
Lonergan then parried a 30-yard strike from Josh Simpson before Preston took the lead with their first attempt on goal, Mellor producing a superb finish from 20 yards.
Ross Wallace fired over the bar from 20 yards and Simpson and Jake Livermore failed to test Lonergan as half-time approached.
Preston had two decent chances to double their advantage within a minute after the break.
First Richard Chaplow's header from Callum Davidson's cross was tipped over by goalkeeper Joe Lewis, who then produced a fine save to keep out Sean St. Ledger's header from Wallace's resulting corner.
Mellor forced another save from Lewis as the visitors upped the ante.
The England Under-21 international was by far the busier keeper and he was called into action once more to deny St. Ledger again, before Boyd let fly from 30 yards but the save was comfortable for Lonergan.
Substitute Izale McLeod struck an effort wide from 25 yards as Peterborough lost a home league game to Preston for the first time.
It was also their 16th league loss of the campaign and leaves manager Mark Cooper with a massive job on his hands.