New Zealand were in trouble at halftime, trailing 4-1. However three penalty corner flicks from Andy Hayward - his third coming in the final minute of regulation time - took the game into a shootout.
New Zealand, using the same group who had performed strongly at the World League final in New Delhi in January, went 2-0 up while the Malaysians missed their first two. However three successive missed shots cost New Zealand dearly and allowed Malaysia back into the contest, and ultimately snatch a surprising win.
''It's always hard coming back from a three-goal deficit. I'm proud of my players ... the way they fought back and creating a lot of chances," Batch said.
"In a shootout, it is always dicey but that's how it is. We are certainly disappointed at losing this way."
The result means New Zealand can finish no higher than fifth.
They face Poland, whom they beat 8-3 in pool play, on Saturday night in the 5th to 8th classification.
Result: Malaysia 4 (Muhammad Subbah 2, Azlan Misron, Fitri Saari) New Zealand 4 (Andy Hayward 3, Steve Edwards). HT: 4-1.
Malaysia won 3-2 on penalties.