Opening bowler Matt Rowe hit the winning shot to complete a brilliant game for the right-armer.
He snaffled five for 21 to help rout Afghanistan for a paltry tally of 91.
But the chase hit the skids. New Zealand had slumped to 52 for six by the time Otago’s Zac Cumming was dismissed for five.
Allah Mohammad Ghazanfar ran through the New Zealand top order.
Captain Oscar Jackson showed some resolve with a valuable knock of 26. He combined with Sam Clode (7) to add 30 for the seventh wicket and get the chase back on track.
But with victory in sight, they were both removed from the crease, and tailender Ewald Schreuder was run out at the non-striker's end — a sneak attack known as the Mankad.
It is a legal dismissal now, but it felt and looked sneaky. Schreuder was not trying to steal a headstart — he was just guilty of taking a stride out of his crease when he thought the bowler, Afghanistan captain Naseer Khan, had let his delivery go.
He hadn’t. He held on to it and waited for Schreuder to walk forward and bingo. He ran him out.
New Zealand still needed two runs to win and were nine down.
Rowe remained calm despite the atmosphere. He hit the winning runs off the very next ball to clinch a tense win for New Zealand.
Jackson described the match as a "great game of cricket" and praised Rowe for his excellent spell.
"It was a great day for bowling and our top bowlers did a great job.
"Matthew Rowe was just unbelievable today — his control and line and length were perfect and broke the game wide open for us.
"After the day he had with the ball, it was always going to be his day [on him hitting the winning runs]."
The Palmerston North paceman is the cousin of White Ferns pace bowler Hannah Rowe.
New Zealand play Pakistan in their next pool game.