Stokes's England ODI record 182 sets up win over New Zealand
Stokes's stunning innings almost accounted for all of England's 181-run margin of victory as they went 2-1 up in a four-match series ahead of Friday's finale at Lord's.
England were struggling at 13-2 after Trent Boult's early double strike.
But Stokes and Dawid Malan (96) turned the tide with a third-wicket partnership of 199 as England recovered to 368 all out.
Either side of Stokes's remarkable innings, Boult kept New Zealand in the game with an impressive return of 5-51 in 9.1 overs.
England were set for a huge total at 348-5 when Stokes was dismissed.
But they lost their last five wickets for 20 runs, left-arm quick Boult wrapping up the innings with 11 balls to spare.
England, however, had more than enough runs, with paceman Chris Woakes (3-31) doing the damage as New Zealand - without regular skipper Kane Williamson while the star batsman completes a pre-World Cup recovery from a knee injury - slumped to 37-4.
Glenn Phillips kept England at bay with a 57-ball fifty, but when he was lbw for 72 to spinner Liam Livingstone the Black Caps were all but beaten 173-8.
Livingstone (3-16) ended the match with 11 overs to spare when he had last man Ben Lister stumped by England captain Jos Buttler as New Zealand were bowled out for 187.
Earlier, Boult had Jonny Bairstow caught at deep backward square off the first ball of the match before inducing Joe Root to inside-edge a drive onto his stumps.
But Stokes, who only recently reversed his ODI retirement, hit back in stunning fashion.
His stunning 124-ball innings, including 15 fours and nine sixes, surpassed Jason Roy's previous England record of 180 against Australia at Melbourne in 2018.
Knee problem
But one worrying sign for England was the familiar sight of Stokes, whose previous ODI top score was 102 not out, occasionally grimacing in pain thanks to a chronic knee problem he hopes to manage all the way through the World Cup.
Boult again troubled an England top-order once more missing Roy after the opener suffered a fresh back spasm.
But the returning Malan, who missed England's 79-run win in Southampton on Sunday to attend the birth of his son, responded with a 52-ball fifty as he looked to cement his place in a 15-man World Cup squad.
Stokes took 15 runs off a single Lockie Ferguson over, including three fours, despite the fast bowler reaching speeds of 94 mph and also hoisted left-arm spinner Rachin Ravindra for three huge sixes.
Malan, fell just shy of what would have been his fifth hundred in 20 ODIs when he got a faint edge to wicketkeeper Latham.
Stokes broke Roy's record in style with a six off Lister, only to hole out off the paceman two balls later.