A one man batting effort by Sri Lankan all-rounder Thisara Perera wasn't quite enough as New Zealand won the second one-day international by 21 runs at Mt Maunganui.
Sri Lanka were 128 for seven at one stage in their chase for 320 runs, but a century by Perera got them close.
Perera hit the highest score by a Sri Lankan against New Zealand in ODI's, his 140 included 13 sixes and eight fours.
The tourists were bowled out in the 47th over.
Earlier New Zealand scored 319 for seven in their 50 overs with Ross Taylor top scoring with 90, while Colin Munro made 87 and James Neesham 64.
Ish Sodhi finished with three wickets.
New Zealand win the series 2-nil with the third and final match in Nelson on Tuesday.
Captain Kane Williamson conceded he had visions of his side snatching defeat from the jaws of victory as Perera's blistering century threatened to turn the match. He wasn't the only Black Cap feeling the pressure, with spinner Ish Sodhi also admiring the Sri Lankan's efforts.
"It was a fantastic innings," said Sodhi.
"Any innings like that is obviously very special - I'd say nine times out of 10 they'd come up on the winning side but it was thanks to some early wickets that they didn't have enough wickets in the tank to keep it going the entire 50 overs.
"We're happy to get away with the win and the series."