Kurt Myers, the man who went on a rampage and killed four people in Mohawk, has been shot dead in an abandoned building in the town of Herkimer.
The 64-year-old was involved in a shootout after he fired at a police dog and killed it.
Jack Keller, a state trooper, said: "He was waiting for us. He kills the dog. They hear shots fired. Our teams return fire and the suspect gets shot."
Myers was on the run after going on on a shooting spree in the small neighbouring village of Mohawk, 170 miles north of New York City. He shot dead two people at a barbershop and two at a carwash and injured two others.
He went into the barbershop and asked one of the men working there if he remembered him before opening fire, said witnesses.
Mary Hornett, the sister of John Seymour who was wounded in the attack, said: "The guys were in the barbershop and this guy comes in and he says, 'Hi John, do you remember me?' and my brother said, 'Yes, Kurt, how are you?' and then he just started shooting."
Seymour was in a critical condition in hospital, she said.
Police were trying to determine what caused Myers to snap. "My brother couldn't think of any reason why he would do such a thing," Hornett added.
Before his assault, Myers had set fire to his apartment.
His victims were named as Harry Montgomery, 68, and Michael Ransear, 57, Michael Renshaw, 23, and Thomas Stefka, who was in his 60s.
The second man injured has been identified as Dan Haslaur, a customer at the barbershop. He is in a critical condition.
Neighbours said they did not know Myers as he rarely spoke to anyone. Thery described him as a loner who ignored them when they tried to greet him.
Gary Urich said: "[He walked past and] I said, 'How are you doing?' No response. He just walked by."
New York state governor Andrew Cuomo, said it was a "truly an inexplicable situation".