In a stunning display of power hitting, Ronchi (170 not out) and Elliott (104 not out) bludgeoned an unbeaten 267 to lift New Zealand from 93-5 to 360-5 in their 50 overs in a world record sixth-wicket stand.
Sri Lanka had their own century-maker in Tillakaratne Dilshan and looked to be in with a chance as long as he was at the crease.
But when Dilshan fell for 116 it sparked a spectacular collapse in which Sri Lanka lost eight wickets for just 41 runs in eight overs.
In the fourth ODI in Nelson on Tuesday, their last six wickets were whittled out for just 31 runs.
More From This Section
Faced with a daunting target of 361 to win in Dunedin, Sri Lanka confidently progressed to 93 before losing their first wicket when stand-in captain Lahiru Thirimanne was removed for 45.
After Kumar Sangakkara went cheaply for nine, Mahela Jayawardene (30) joined Dilshan to lift the momentum as the tourists reached 211 in the 36th over
Four balls later Mitchell McClenaghan claimed the prized wicket of Dilshan and the Sri Lankan fight was over.
Dilshan had posted his 20th ODI century and the third in his past five innings in an unflustered display until he mistimed a drive on a slower delivery and was well held by Nathan McCullum at extra cover.
Boult was New Zealand's chief destroyer with four for 44 while McClenaghan, Elliott and Tim Southee took two wickets each.