The win at Clontarf promoted Bangladesh to sixth place, above Sri Lanka in the standings, with just four months to go before the cut-off date of September 30 when the top eight are guaranteed automatic qualification for the finals in England.
An unbroken stand of 72 between Mushfiqur Rahim and Mahmudullah saw the Tigers to their victory target of 271 with 10 balls to spare.
Mushfiqur finished 45 not out at exactly a run a ball but the partnership was dominated by a superb innings from Mahmudullah who scored his 3,000th run in his 36-ball 46, with six fours and a six.
He took 14 off the 47th over, bowled by Hamish Bennett to make the last three overs a formality and fittingly Mahmudullah hit the winning boundary.
Bangladesh had the momentum going into the second innings after they had restricted the Black Caps to 270 for eight, with just 62 coming from the last 12 overs as five wickets fell.
Tamim Iqbal and Sabbir Rahman then carried it on with a second wicket stand of 136 with both batsmen dismissed for 65.
Tamim was caught at deep mid-wicket off Mitchell Santner and Sabbir run out by the length of the pitch when he found himself at the same end as Mosaddek Hossain.
But despite Shakib Al Hasan holing out to long leg with 72 still needed from 70 balls, it was to be New Zealand’s last success.
Bangladesh won in spite of a desperately poor fielding performance which saw four dropped catches including man of the series Tom Latham before he had scored and again the ball after reaching his 50.
He was eventually bowled by Nasir Hossain, playing his first match of the series, for 84 from 92 balls with 11 fours.
The Black Caps also had a century second wicket stand of 133 between Latham and Neil Broom who was dropped on 56. That miss cost only seven runs as Broom swept to square leg and was well held by the captain.
Latham's dismissal still left the Black Caps well placed on 167-3 in the 31th over and on course for a total of 300 but the wicket of the dangerous Corey Anderson led to a collapse –- at one stage they lost three wickets for two runs in 11 balls -– and it needed Ross Taylor to hold the innings together.
The former captain finished 60 not out, from 56 balls with just six fours, as wickets fell around him.