England, who won the series 4-1, never produced the explosive power that has characterised their recent one-day batting.
Jason Roy made 87 off 89 balls and Ben Stokes 75 off 76 but they lost wickets at regular intervals, Pakistan seamer Hasan Ali completing figures of 4-60.
England fast bowler Mark Wood took two wickets in one over to reduce the touring side to 77 for three before Sarfraz and Shoaib assumed control.
They attacked England spinner Liam Dawson on his ODI debut and Sarfraz struck an excellent 90 off 73 balls before skying Dawson to Alex Hales on the boundary.
The experienced Shoaib also fell to a catch in the deep off Dawson for 77 but Mohammad Rizwan's unbeaten 34 guided Pakistan home.
The sides, who drew 2-2 in the test series, meet in a one-off Twenty20 international in Manchester on Wednesday.
(Reporting by Ed Osmond; Editing by Ken Ferris)
