The train driver saw the man about 300m away and tried to alert him by blasting his horn. But the man continued to walk backwards and stepped into the path of the train.
The train had five passenger carriages and came to a stop as soon as possible, police said. Witnesses had said the bells and level crossing were working.
Police spokeswoman Kimberley Mathews said the man was wearing high-visibility clothing.
The people he had been talking to were doing construction work in the area, she said.
There was nothing to indicate he had intentionally stepped in front of the train and all signs at this stage were that it was a tragic accident.
Yesterday's fatality has pushed to eight the number of people killed this year on train tracks.
Most were trespassing in rail corridors rather than using approved level crossings.
Although that is well down on last year's toll of 23 deaths on the tracks, rail safety campaigners at the Chris Cairns Foundation believe the dangers will increase once Auckland's quieter new electric trains start running between Onehunga and Britomart in April.
"People will need to ensure they are alert at all times around the tracks, avoid distractions and always look both ways for trains," said foundation manager Megan Drayton.
Six deaths this year - including yesterday's - occurred on railway tracks away from level crossings and illustrated "a real problem with the culture in this country."
"People wouldn't stand in the middle of a motorway but seem to think it's okay to stand in the middle of a railway track."
Ms Drayton said there were more than 230 recorded incidents of people trespassing on rail tracks last year.
Almost half involved children or teenagers and included people playing chicken, walking over or jumping off rail bridges, filming or photographing on tracks and taking shortcuts.
"People are putting their lives at enormous risk and need to realise that the rail corridor is not a playground and they should never be on railway tracks at any place other than a level crossing."
KiwiRail spokeswoman Jenni Austin reinforced Ms Drayton's message, saying Auckland's new electric trains would be quieter and faster than the diesel stock they were replacing "so it is especially important that people only cross at level crossings".
But it was at level crossings where a woman and three children were injured after their car and a train collided at Taupaki in West Auckland last week, and where a young disabled woman was almost killed after her wheelchair became stuck in tracks in the path of an oncoming locomotive in Morningside in February.
Rail deaths
2013 - 8
2012 - 23
2011 - 13
2010 - 10
2009 -12
- additional reporting APNZ