Malinga returned career-best figures of 5-6 to bundle New Zealand, who won the series 2-1, out for 88 while chasing 126 in Kandy.
The 36-year-old Malinga bowled Colin Munro for 12 on the third ball of his second over to become the first T20 bowler to claim 100 wickets as he began his demolition of the Kiwi batting.
He then sent Hamish Rutherford, Colin de Grandhomme and Ross Taylor back to the pavilion on balls four, five and six as he raised the roof in front of a raucous home crowd. New Zealand slipped to 15 for four.
“Yorker was my best ball, I only try my best to bowl the right line and right length,” Malinga, known for bowling yorkers with his slinging action, said.
“Really happy that we won the match, I am a wicket-taking bowler when I play for Sri Lanka… I always want to give all my experience to the youngsters before the (T20) World Cup (next year).”
It was only the third time a bowler had taken four wickets in as many balls in internationals, after Malinga himself against South Africa at the 2007 World Cup, and Afghanistan’s Rashid Khan earlier this year.
He now has five hat-tricks in international cricket to his name, with three in one-day internationals and two in T20Is.
Malinga, who surpassed Pakistan spinner Shahid Afridi’s tally of 97 scalps to become the leading T20 international wicket-taker on Sunday, came back in his third over to get Tim Seifert for eight and register his second five-wicket haul in T20Is.
The veteran speedster, who retired from Test cricket in 2011 and played his farewell one-day international in July, has improved his T20 tally to 104 wickets in 76 matches.
Akila Dananjaya backed up his captain’s effort with two wickets while Lakshan Sandakan wrapped up the win in 16 overs after trapping Seth Rance lbw for eight.
New Zealand skipper Tim Southee remained unbeaten on 28 and praised his opposite number for a “great spell” of bowling.
“Credit to Sri Lanka for the way they played and Malinga’s spell just broke our back today,” said Southee. “He’s done it in the past, and it was a great spell from a class T20 bowler.”
Earlier, spinners Mitchell Santner and Todd Astle shared three wickets each to keep Sri Lanka to 125 for eight after the hosts elected to bat first.
Santner returned impressive bowling figures of 3-12 from his four overs including a maiden with his left-arm spin.
Opener Danushka Gunathilaka top-scored with 30 before falling to Astle’s leg-spin as Sri Lanka lost their way after the powerplay.
Wicketkeeper-batsman Niroshan Dickwella (24), Lahiru Madushanka (20) and Wanindu Hasaranga (14 not out) were the only other home players to reach double figures.