Guptill (105) rebuilt the Black Caps??? innings after the early exits of skipper Brendon McCullum and Kane Williamson, with New Zealand chasing down their target of 289 with??seven balls??to spare in Hamilton.
Ross Taylor (56 from??97 balls) gave Guptill ample support during a measured knock, while Corey Anderson (39 from 26) smashed runs later on as Brendon McCullum???s side survived a scare to secure a sixth straight group-stage win.
New Zealand will face the fourth-placed side in Pool B ??? either Ireland, Pakistan or West Indies ??? in their quarter-final in Wellington on March 21, while Bangladesh will meet India at the MCG two days earlier.
Bangladesh batsman Mahmudullah will head into that contest with the reigning World Cup champions in fine form after hitting his second century in as many games in the defeat to New Zealand.
Mahmudullah???s (128 not out) came just four days after his 103 versus England ??? his maiden ODI century and the first by a Bangladeshi in a World Cup ??? secured the Tigers a quarter-final berth and dumped Eoin Morgan???s men out.
The 29-year-old could have been dismissed for one at Seddon Park but Anderson shelled a catch off the bowling of Tim Southee, and the batsman made the most of his reprieve by putting 90 with Soumya Sarkar (51) for the third wicket after the pair joined forces at 27-2.
Mahmudullah ??? just the second Bangladeshi, after Shahriar Nafees against Zimbabwe in 2006, to record back-to-back ODI tons ??? smoked 12 fours and three sixes in his 123-ball knock and combined with Sabbir Rahman (40 from 23 balls) to add 104 in the final 10 overs as??the Tigers posted 288-7.
Bangladesh carried that momentum into New Zealand???s innings, with Shakib Al Hasan dismissing the destructive McCullum (eight) and Kane Williamson (one) to leave the Black Caps 33-2 in the fifth over.
However, Guptill and Taylor shared a 133-run stand for the third wicket and while Bangladesh eked their way back into the contest with late wickets, cameos from Grant Elliott (39 from 34), Anderson, Daniel Vettori (16 from 10) and??Southee (12 from six)??denied??the??Asian outfit??another famous victory.