It has prompted fresh vows by officials for measures to reverse a surge in violence in the city's transit system.
Five of those shot were in critical but stable condition, and six others were injured by shrapnel from bullets and other sources, as well as a panicked crush of people fleeing the carriage as it quickly filled up with smoke, officials said. Some riders collapsed to the ground as they poured on to the platform in Brooklyn's Sunset Park neighbourhood.
A massive manhunt for the perpetrator - described as a Black male with a heavy build, wearing a green construction-type vest and a hooded sweatshirt - was underway.
New York Police Department (NYPD) Commissioner Keechant Sewell said the shooting was not currently under investigation as an act of terrorism, although authorities would not rule anything out as a motive.
"This morning, as a Manhattan-bound N train waited to enter the 36th (Street) station, an individual on that train donned what appeared to be a gas mask, he then took a canister out of his bag and opened it," Sewell told a press conference.
"The train at that time began to fill with smoke. He then opened fire, striking multiple people on the subway and in the platform," she added.
Outside the station, in an area known for its thriving Chinatown and views of the Statue of Liberty, authorities shut down a dozen or so blocks and closed off the immediate area with yellow crime scene tape.
Students and staff at all schools in the neighbourhood were directed to shelter in place.
John Butsikares, a 15-year-old who passed through the 36th Street station soon after the incident, said the train conductor ordered everyone on the station platform to get on board.
"I didn't know what happened. It was a scary moment. And then at 25th street (the next station) we were all told to get off. There was people screaming for medical assistance," said Butsikares, who was going to school.
"It was just a scary moment. It was, everyone was packed together, and I didn't know what happened until after."
'Surge of crime'
New York, the United States' most populous city, has seen a sharp rise in violent crime during the pandemic, including a spate of seemingly random attacks on New York City's subway. The system is one of the world's oldest and most extensive.
The spate of violent crime in the subway has included a number of attacks in which passengers have been pushed onto the tracks from platforms, including a Manhattan woman whose murder was seen as part of a surge in hate-driven attacks against Asian Americans.
New York Mayor Eric Adams, a former NYPD captain and Brooklyn borough president who took office in January, has vowed to make the city's subway safer by increasing police patrols and expanding outreach to the mentally ill.
Speaking to CNN, Adams said Tuesday's incident "was a senseless act of violence" and pledged to double the number of officers on patrol in the subway.
New York Governor Kathy Hochul pledged "the full resources of our state to fight this surge of crime, this insanity that is feeding our city." The White House said its staff were in touch with Adams and Sewell to offer any assistance and that President Joe Biden had been briefed about the incident.
City transit investigators found containers with gasoline and additional unused smoke canisters on the train carriage and the shooter's firearm jammed, preventing further deaths, television station NBC 4 New York reported, citing city transit sources.
But officials told WABC-TV that there were no working cameras at the 36th Street station, likely complicating any investigation. The NYPD and the Metropolitan Transportation Authority, which runs the city's subways and buses, said they had no information about cameras not working.
After the shooting, local and federal law enforcement officers rushed to the scene, and many could be seen donning heavy-duty armour and helmets. They were watched by small crowds of people on sidewalks huddled against buildings in a drizzle.
Brooklyn resident Yayha Ibrahim said he saw people running from the station, and decided to walk down into it to see what was happening.
"I saw a lady, she was shot right in her leg and she was screaming for help," he said. Rescue workers "did a good job of coming quick and fast, and the ambulance came in and they took her."