Malinga, who recently bowed out of ODI cricket after playing against Bangladesh at home, took the 99th scalp of his career to surpass Afridi's tally of 98 wickets in the shortest format.
He initially clean bowled Colin Munro with a quality yorker in the first over of the Black Caps chase before returning to dismiss Colin de Grandhomme towards the end of the innings.
The 36-year-old reached the landmark in the 74th match of his career while Afridi, who also captained Pakistan, featured in 99 T20 games.
Malinga's impressive returns of 2-23 were not enough to subdue Ross Taylor's sublime contribution of 48 off 29 deliveries as New Zealand managed to achieve victory by five wickets.
Malinga, known for his slinging bowling action and remarkable accuracy in darting in pinpoint yorkers, began admirably by giving away just eight runs in his first three overs.
He then bowled the penultimate over of New Zealand's chase, which saw the visitors getting 15 runs and subsequently landed them within touching distance of the target.
Malinga's latest feat sees Sri Lankans occupy the highest wicket-taker slot in all three forms of the game with Muttiah Muralitharan topping the charts in Tests and ODIs.