After setting a 180-run target for the Kiwis, India ran into Kiwi skipper Kane Williamson, who hit a brilliant 95 off 48, before becoming Shami's first victim.
After dismissing Williamson off the third ball, Shami bowled Ross Taylor off the last ball as the normal play ended in a tie.
Shami needed to defend nine and he did in style, after conceding a six off the first ball, hit by Taylor. Watch the last ball here:
Then, Rohit Sharma hit back-to-back sixes to hand the Kiwis their third successive Super Over defeat and India, their maiden T20I series win in New Zealand.
Earlier, New Zealand won the toss and opted to bowl first.
Rohit, who earlier scored 65 off 40, hit 15 as India chased down New Zealand's score of 17 to win the third T20I and take an unassailable 3-0 lead in the five-match T20I series.
New Zealand skipper Kane Williamson followed up his excellent 95 with an unbeaten 11 in the Super Over, but it just wasn't enough as Rohit and K.L. Rahul (5*) took Tim Southee to the cleaners.
This after the game was tied as India pacer Mohammed Shami came up with a classic last over just when it looked like Williamson would take the Kiwis home with a batting master-class.
It is for a reason that the Indian bowling attack is considered one of the best in the world and with Jasprit Bumrah having a one-off bad day, Shami rose to the challenge and bowled a brilliant last over as New Zealand failed to score the 9 runs required despite Ross Taylor starting the over with a six.
While Shami dismissed Williamson off the third ball of the over, he cleaned up Taylor (17) off the last ball with the Kiwis needing one run to win.
Earlier, Williamson single-handedly took the game away from the Indians in the 17th of the innings - Bumrah's third. The Kiwi skipper picked 14 from the over to bring the required rate below the 10-run mark.
Going into the 17th, New Zealand needed 43 off 24 balls. But at the end of the over, the Kiwis needed 29 from the last three overs. With Ross Taylor giving Williamson company, it was all about not doing anything reckless for the hosts.