Afghanistan recovered from 7-2 and 59-6 to set New Zealand 187 to win their World Cup Pool A clash in Napier.
The Black Caps started well with the ball as Trent Boult (3-34), one of the stars of their one-wicket win over Australia last weekend, trapped Javed Ahmadi in the second over.
Daniel Vettori, who finished with figures of 4-18, got in on the act early on by bowling fellow opener Usman Ghani for a duck to leave the Afghan innings at 6-2.
Boult removed Asghar Stanikzai before Vettori claimed the wicket of Nawroz Mangal as the hosts took full control.
When the experienced spinner removed captain Mohammad Nabi and Afsar Zazai in successive balls, Afghanistan were struggling at 59-6.
However, a partnership of 86 between Samiullah Shenwari and Najibullah Zadran (56) helped the minnows to reach a more competitive score.
Despite some late hitting from the tail end, Corey Anderson managed to wrap up the innings when Hamid Hassan (16) picked out Adam Milne in the deep.