Rubel finished with 6-26, helping the hosts to dismiss New Zealand for 162 runs after the visitors were set a revised target of 206 runs in 33 overs in the rain-hit match at the Sher-e-Bangla National Stadium in Dhaka.
New Zealand were 82-3 in 20 overs, replying to Bangladesh's 265 all out, when rain halted the game for nearly two hours.
Needing 124 off 78 balls on resumption, Corey Anderson hit some lusty blows before Rubel turned the table with his hat-trick.
New Zealand skipper McCullum was caught by substitute fielder Shamsur Rahman while Neesham flicked a catch to wicketkeeper Mushfiqur Rahim on the leg side as Rubel became the third Bangladeshi to claim a hat-trick in a one-day international (ODI).
More From This Section
Rubel took the wicket of Ross Taylor before rain later added Nathan McCullum and Grant Elliot (71) to his tally, equalling the record of Mashrafe Mortaza for the best ever ODI bowling for Bangladesh.
The visitors conceded a defeat as Kane Williamson was unable to bat for a thumb injury.