A convicted felon lured them to the blaze which police said he apparently set as a trap in the town of Webster, east of Rochester, on the shores of Lake Ontario.
The 62-year-old shooter, who was found guilty of manslaughter and jailed for 17 years for his grandmother's death in 1980, then fatally shot himself.
"It does appear that it was a trap that was set for first responders, but causative reasons we don't have at this time," said Webster police chief Gerald Pickering.
"These people get up in the middle of the night to put out fires, they don't expect to be shot and killed.
"We are a safe community, a tragedy like this is just horrendous."
The firefighters were shot as they approached the scene of the blaze - a car and a house engulfed in a fire believed to have been set by the shooter, identified as William Spengler.
"Four of the firefighters were shot. Two are deceased, two were transported to area hospitals," Mr Pickering said.
The two injured men were in guarded condition and were expected to recover.
An off-duty police officer who responded was also shot and wounded.
'I am shot'
One of the injured firefighters, all volunteers in the small suburb of Rochester, was able to escape and call for help.
His call was recorded and has been broadcast on local television:
"We are being shot at. Multiple firemen down. Multiple firemen are shot. I am shot.
"I think he is using an assault rifle. We have multiple firemen down. Working fire."
A security cordon was put up around the scene and residents were evacuated.
Seven homes were destroyed in the blaze as the shooting thwarted initial efforts to douse the flames.
Mr Pickering said emergency personnel had not yet been able to search the torched homes for possible additional victims.
New York governor Andrew Cuomo called the incident a "horrific shooting" and offered his condolences to the families of the victims.
"New York's first responders are true heroes as they, time and again, selflessly rush toward danger in order to keep our families and communities safe," Mr Cuomo said in a statement.
"We, as the community of New York, mourn their loss as now two more families must spend the holidays without their loved ones."
Map: Webster shooting
Guns sales soar
The shooting comes a day after the head of America's most powerful gun rights group, the National Rifle Association (NRA), emphatically ruled out supporting greater controls on weapons or ammunition in the US.
There are renewed calls for greater gun control following the mass shooting and children and teachers at a school in Newtown, Connecticut, earlier this month.
President Barack Obama says he will support a new bill banning assault rifles and curb the transfer, importation and possession of such arms.
Since flagging the crackdown, gun sales have sky-rocketed as enthusiasts fear certain assault weapons and high-capacity magazines could be banned.
"The president said he wanted quick action, and so that is going to fuel the buying frenzy, and it is," said Larry Hyatt, an owner of a gun shop in Charlotte, North Carolina, describing the rush as largely "politically motivated".
"We have been in business for 50 years, and we have seen (fear-based buying) before.
"But this is more intense because the president got in the media and basically said, 'if you want a gun, you better get it now'."
That means bigger business for an already huge industry: the gun and ammunition manufacturing industry in the US groups about 300 companies with combined yearly sales estimated around $7 billion.
Florida, the most heavily armed state, rocketed this week to a new record of active carry permits - over 1 million. Florida has 19 million people.
There were an estimated 310 million non-military firearms in the US in 2009, roughly one per citizen, and people are 20 times more likely to be killed by a gun than someone in another developed country.
The US has suffered an explosion of gun violence over the past three decades including 62 mass shooting incidents since 1982.
MAP: Mass shootings in the United States since 1990