The 25-year-old blasted 82 off just 42 balls and then claimed 2-17 from three overs before limping off with cramp.
Anderson left the field after five overs of Pakistan’s chase of 197, with the score on 36 for four, but he had already caused enough damage to ensure the Black Caps took the three-match series 2-1.
He arrived at the crease at 62 for two after Martin Guptill had again gone berserk, hitting six fours and two sixes in contributing 42 off 19 balls to an opening stand of 57 with Kane Williamson, who made 33, and Colin Munro was run out.
Anderson blasted six fours and four maximums, taking apart Wahab Riaz who conceded 43 from four overs, to lift the Kiwis to 196 for five.
Pakistan’s chase started badly as they lost four wickets in the opening five overs, two of them to Anderson, and things did not get any better.
Only Shoaib Malik, Anderson’s second victim for 14, and Sarfraz Ahmed, with 41, reached double figures as the tourists were skittled for 101 in the 17th over.