Jos Buttler's stunning 50-ball century proved the difference as England edged Pakistan by 12 runs in a run-fest at Southampton on Saturday.
Buttler's 110 not out was the highlight of England's 373 for three.
But Pakistan, thanks mainly to opener Fakhar Zaman's 138, stayed in the run chase before a target of 19 off the last over, bowled by Chris Woakes, proved beyond their reach as they finished on 361 for seven.
England captain Eoin Morgan struck an unbeaten 71 in a 162-run partnership with Buttler.
"He's very good. He really is," Morgan told Sky Sports. "I was in prime position to see the whole innings and his freakish knocks seem to be getting closer and closer together."
"He seems to have a gear that not many of us have. I certainly don't have it."
Pakistan, chasing a national record 374 for victory, saw Fakhar and Babar Azam (51) put on 135 for the second wicket.
But when both batsmen fell in successive overs, it seemed their chance of an improbable win had gone with them.
Asif Ali ensured Pakistan stayed in the game with 51 before he was caught in the deep off David Willey’s bowling, who went for 57 runs with two wickets.
Pakistan captain Sarfraz Ahmed, who remained unbeaten at the end, praised his side for getting so close to the total.
"It's definitely hard to take, getting so close, the way my team responded because it was not an easy target to chase," he said.
"I'm very proud of the team, the way Fakhar Zaman, Imam ul-Haq and Babar Azam played, especially as the way they're playing is a great sign for upcoming matches."
At one stage, it appeared that England's decision to rest fast bowler Jofra Archer might backfire.
Fakhar, the century-making hero of Pakistan's 2017 Champions Trophy triumph, was soon driving the recalled Woakes for six and later twice struck the fast-medium bowler for scoop shots.
He also swept and drove Adil Rashid for two fours in the leg-spinner's first over.
But England's moment came when Fakhar chased a wide delivery from Woakes and edged to Buttler, although it needed Morgan's review to confirm the dismissal. In total, Fakhar faced 106 balls including 12 fours and four sixes.
The third ODI will be played at Bristol on Tuesday.