Stoke missed the chance to open the scoring in the ninth minute after being awarded a penalty when Sean St Ledger tripped David Kitson. But North End goalkeeper Andy Lonergen dived to his right to turn Liam Lawrence’s spot-kick around the post.
Visiting goalkeeper Thomas Sorensen made several fine saves to keep his side on level terms but misjudged a corner in the 31st minute and Mellor fired into an empty net.
James Beattie headed wide for Stoke from close range in the 40th minute but Mellor netted his second just before the break, beating two defenders and catching Sorensen off guard with a 15-yard effort.
Substitute goalkeeper Wayne Henderson twice denied Matthew Etherington in the second half although City did pull a goal back with 12 minutes left when Richard Cresswell nodded home a trademark long throw-in from Rory Delap.