With Malaysia leading 3-2 and time fast fading, Kane Russel fired home a last-gasp equaliser to make it 3-3 and take the game into a shootout, which the Kiwis won 5-4.
Malaysia got their goals in regulation time through Mohd Ramadan Rosli (seventh minute), Fitri Saari (11th, 44th) while Phillip Hayden (27th) and Russel (43rd, 58th) scored for New Zealand.
In the shootout, Mohd Firhan Ashaari, Mohd Faiz Helmi, Mohd Shahril Saabah and Haziq Shamsul found the target while Fitri missed the fifth flick.
For the Kiwis, the scorers were Hugo Inglis, Nick Wilson, Shay Neal, James Coughlan and George Muir.
National coach Stephen van Huizen was disappointed for the boys as “they had given their best in front of the home crowd”.
“After a hard game against India, we actually showed character against New Zealand. I’m actually very disappointed for the boys, we deserved the third spot,” he said.
Earlier, Pakistan finished fifth after defeating Canada 3-1 in the classification match.
Goals from Fareed Ahmed (11th minute), Ajaz Ahmad (27th) and Mohamed Arshad (57th) were enough to sink the Canadians.
Although Canada came to life in the fourth quarter, Iain Smythe’s 51st-minute goal proved too little, too late.