England, chasing a target of 248, finished on 252 for six with 12 balls to spare.
They were in trouble at 72 for four before a fifth-wicket stand of 103 between Ben Stokes (69) and Jonny Bairstow (61) got their innings back on track.
Moeen Ali (45 not out) ended the match by driving Azhar Ali, the Pakistan captain, for six.
Pakistan were held to 247 for eight after winning the toss.
Azhar made 80 and Imad Wasim 57 not out in an innings where the next best score was Sami Aslam's 24.
The series concludes with a day game in Cardiff on Sunday.
Disclaimer: No Business Standard Journalist was involved in creation of this content