Opener Tillakaratne Dilshan top-scored for Sri Lanka with an unbeaten 119, hitting one six and 11 fours in his 139-ball knock.
Pakistan lead 1-0 in the five-match series following their six-wicket win in the opening one-dayer on Thursday.