The 28-year-old Bairstow hit his ninth boundary before he was bowled by Trent Boult for 104. Joe Root (23 not out) and Ben Stokes, who hit a six to win the game and finish 26 not out, guided England to 229 for three in 32.4 overs.
"It's different from batting in the middle order but my job now is to score big hundreds and contribute match-winning scores. That's what I'm trying to do but it's still a work in progress," said Bairstow, who also took a brilliant, diving one-handed catch on the boundary.New Zealand had been dismissed for 223 after England never allowed the hosts to develop any momentum with the bat.
The hosts slumped to 93 for six in the 27th over and only had the innings rescued by an 84-run partnership between Mitchell Santner (67) and Henry Nicholls (55).England were helped by the absence of New Zealand batsman Ross Taylor, who was ruled out with a thigh injury that he aggravated when he scored an unbeaten 181 in the five-wicket win in the fourth game on Wednesday.
Eoin Morgan's bowlers, however, also exploited what little help the conditions offered early on to ensure the hosts lost regular wickets from the first over.Chris Woakes and Mark Wood conceded a miserly 27 runs in the first 10 overs before spinners Moeen Ali and Adil Rashid, who finished with three for 42, ran through the middle order.
Martin Guptill was the only batsman in the top five to provide any resistance with 47, before Nicholls and Santner ensured New Zealand had a total to bowl at but it was never going to be enough against the powerful England batting lineup.