Set a target of 248, New Zealand were dismissed for 207 in 46.4 overs and crashed to their sixth successive ODI defeat against Bangladesh, who won Tuesday's series opener by 43 runs.
Off-spinner Sohag Gazi and pacer Mashrafe Mortaza led Bangladesh's bowling attack, sharing six wickets between them to stifle New Zealand, who lost to Bangladesh 4-0 on their previous visit in 2010.
Mashrafe provided the early breakthrough when he bowled Hamish Rutherford for one before Sohag took a return catch to dismiss the other opener, Anton Devcich, for 19.
The tourists were soon on 45-3 when Abdur Razzak trapped Grant Elliot lbw for 14.
Corey Anderson (37) and Ross Taylor tried to repair the damage, but a stunning catch by Mushfiqur Rahim off Mashrafe ended their 61-run stand and gave Bangladesh a firm grip on the match.
Bangladesh sensed victory when occasional left-arm spinner Mominul Haque had New Zealand captain Brendon McCullum out lbw for 14.
Taylor (45) held down one end before he was caught by Mahmudullah off Sohag at long-on.
Some late blows by Nathan McCullum (25 off 23 balls) and unbeaten Kyle Mills (27 off 25 balls) only delayed the inevitable.
Earlier, Corey Anderson and James Neesham each grabbed four wickets as New Zealand bowled out Bangladesh for 247 on a slow Sher-e-Bangla pitch.
Anderson finished with 4-40 while Neesham claimed 4-53, his second successive four-wicket haul in the series.
Bangladesh also lost wickets at crucial times even though most of their batsman got a decent start.
Tamim Iqbal scored an arduous half-century but was out just when the team were looking for him to accelerate.
His 58 off 86 balls, which included five fours and a six, saw him overtake Shakib Al Hasan to become Bangladesh's leading scorer in one-day international cricket.
Tamim, who has now 3,702 runs to his name in 124 ODIs, put on 63 with debutant Shamsur Rahman in the opening stand after captain Mushfiqur Rahim won the toss and elected to bat.
Shamsur, replacing Anamul Haque in the line-up, managed only 25 before he fell to Nathan McCullum.
Bangladesh went into the batting powerplay in the 36th over on 149-3, but three wickets in three consecutive overs pegged them back.
Mominul Haque (31) and Mushfiqur Rahim (31) were the other notable scorers for Bangladesh.
The third match of the series will be on Sunday at Fatullah.
Scorecard
Bangladesh innings:
Tamim Iqbal b Anderson 58
Shamsur Rahman st Latham b N. McCullum 25
Mominul Haque c N. McCullum b Anderson 31
Mushfiqur Rahim c Latham b Neesham 31
Naeem Islam c Latham b Mills 16
Nasir Hossain c B. McCullum b Neesham 3
Mahmudullah c&b Anderson 21
Sohag Gazi c Devcich b Anderson 26
Mashrafe Mortaza b Neesham 14
Abdur Razzak not out 4
Rubel Hossain b Neesham 2
Extras: (b5,lb5, wb4, nb2) 16
Total: (all out, 49 overs) 247
Fall of wicket: 1-63, 2-110, 3-136, 4-169, 5-171, 6-173, 7-221, 8-240, 9-240, 10-247.
Bowling: Southee 10-2-45-0, Mills 10-1-47-1, N. McCullum 8-0-42-1, Neesham 10-0-53-4, Anderson 9-1-40-4, Eliot 2-0-10-0.
New Zealand:
A Devcich c & b Sohag 19
H Rutherford b Mashrafe 1
G Elliot lbw b Razzak 14
R Taylor c Mahmudullah b Sohag 45
C Anderson c Mushfiqur b Mashrafe 37
B McCullum lbw b Mominul 14
T Latham run out 0
J Neesham c Naeem b Sohag 8
N McCullum c Mahmudullah b Mominul 25
K Mills not out 27
T Southee b Mashrafe 0
Extras: (b1 lb 10, wb6) 17
Total: (all out in 46.4 overs) 207
Fall of wickets: 1-5, 2-45, 3-45, 4-106, 5-130, 6-131, 7-143, 8-157, 9-194, 10-207
Bowling: Mashrafe 8.4-0-43-3, Sohag 10-0-34-3, Rubel 9-1-47-0, Razzak 9-0-35-1, Mahmudullah 6-0-24-0, Mominul 4-0-13-2.
Image: Tamim Iqbal
Photograph: Daniel Berehulak/Getty Images
Dhaka ODI: Rubel's hat-trick helps Bangladesh crush New Zealand
Pace bowler Mills to lead NZ in Sri Lanka
Mominul hits unbeaten ton as Bangladesh fight back against Kiwis
Corey Anderson's first Test ton puts Kiwis in command
Bangladesh-New Zealand series drawn after rain washes out final day