The hosts successfully chased down a 217-run target to pick up the win, making their opponents' first-innings score of 595 the highest total made by a losing side.
It breaks a record that had stood for 123 years, with skipper Kane Williamson leading the charge thanks to an unbeaten century and Ross Taylor adding a half-century of his own for a seven-wicket victory.
Bangladesh saw three wickets fall before stumps on day three of the Test to give New Zealand hope, and the Black Caps were able to build on that as they bowled the tourists out for 160-9.
New Zealand saw both their openers depart before Williamson and Kane produced a third-wicket stand of 163, with the latter reaching 104 by the end of the match and his teammate caught out for 60.
The previous record for the highest first-innings total by a losing side was set by Australia in 1894, when failing to win with 586 against England in Sydney.