A catastrophic top order collapse from the BLACKCAPS meant a fourth consecutive loss to Bangladesh at Shere Bangla National Stadium in Dhaka.
The BLACKCAPS bowling attack were on song, rolling the home side for 174 in the 45th over after they lost the toss and were asked to field but their pursuit fell three runs short with the final wicket tumbling with three balls left to go.
It was the batting that let the side down as Bangladesh new ball bowler Rubel Hossain and spinner Abdur Razzak tore through the BLACKCAPS top order, reducing the tourists to 20 for five.
Brendon McCullum was the first to depart after skying a ball to mid-wicket with Ryder trapped LBW four balls later.
Abdur Razzak then helped complete the run out of BJ Watling before Rubel Hossain nicked out Kane Williamson.
Ross Taylor was the fifth wicket to fall, playing around a straight one from Abdur Razzak leaving Grant Elliott and Daniel Vettori to turn things around.
The pair slowly but surely got their team out of trouble and as they grew in confidence they played their shots. Along the way set a new New Zealand record for the sixth wicket partnership against Bangladesh of 86.
Vettori was the batsman out for 43, falling to a stunning catch in the deep by Shafiul Islam off the bowling of Shakib Al Hasan.
Nathan McCullum came and went for just four and when anchor, Elliott, went for 59 the writing was on the wall.
Andy McKay lasted six balls for no runs bringing number 11 Hamish Bennett to the crease.
With 30 runs required and one wicket left Mills very nearly pulled off a remarkable victory, hitting a series of boundaries at the end of the innings.
It came down to the final over with the BLACKCAPS requiring eight to win. Mills (33) hit the first ball to the boundary then an unsuccessful heave resulted in the second ball being a dot before his stumps were shattered by a pin point Rubel Hossain Yorker.
Rubel Hossain was the standout bowler taking four for 25 while spinners Abdur Razzak and Shakib Al Hasan chipped in with two each.
Earlier, Bangladesh struggled to get going against a determined BLACKCAPS bowling line up, their top four out with just 77 on the board.
The stand out player of the series, Shakib Al Hasan top scored with 36 with a number of other batsmen getting starts but not kicking on.
Andy McKay trapped Shahriar Nafees LBW to have the first wicket. Junaid Siddique was the next to go when Mills induced a leading edge that was caught at mid-off.
Vettori then go into the action, trapping Imrul Kayes in front for 34. The middle orders belonged to the slow bowlers with Vettori, Nathan McCullum and Grant Elliott turning the screws.
Elliott was rewarded with two wickets including the prize scalp of Shakib Al Hasan and keeper Mushfiqur Rahim for 29.
The tail didn’t make any significant contribution with the last four batsmen registering single figure scores.
Mills picked up two late wickets to finish with three for 36 but it was Vettori who once again led the way with three for 32.