At least 17 people were hospitalised with injuries, including four in a critical condition after the building came down on Wednesday afternoon.
Scores of firefighters and police officers wielding pickaxes and power saws clambered over the wreckage overnight, punching holes through the ruins to pull dust-covered people from beneath piles of twisted wood and brick.
Rescuers used dogs to sniff for survivors.
"This has been an incredibly challenging and fast-moving situation, with precarious wreckage to navigate and dangerous voids beneath the surface," Mayor Zohran Mamdani said at a news conference.
"This type of rescue is exactly what the FDNY (Fire Department New York) trains for."
The cause of the collapse was under investigation, but New York City's buildings commissioner, Ahmed Tigani, noted that when the building fell, construction workers were excavating an empty lot next door for a new building.
Much of the rubble from the collapsed building — a mixed-use structure with apartments sitting atop ground-floor commercial space — wound up in a huge pile inside the construction pit.
Another building that shared a wall with the collapsed structure remained standing, but its wall was shorn off, exposing the rooms inside, including a bedroom and closets filled with clothing.
About 250 firefighters were working the scene, Mamdani said.
Firefighters pulled a woman — still alive and moving — out of a hole they had dug into the rubble pile, hoisting her up on a stretcher and rushing her to a waiting ambulance.
Additional people were pulled from beneath the pile as the night went on.
Seven of the casualties were children, authorities said, without specifying whether any were among the dead.
FDNY commissioner Lillian Bonsignore said the rescue teams were performing "dangerous and perilous" work.
"Every move is choreographed," she said.
One firefighter suffered minor injuries, fire officials said.
Phone and email messages seeking comment were left on Wednesday with the architect, property owner and general contractor listed in city records as being associated with the construction project.
One resident of the collapsed building, Anderson Velez, told the New York Post he was at work when his wife called and said she and their two children, aged seven and two, were trapped in the wreckage.
"She called me when the building collapsed while she was inside with rubble on top of her. She was screaming for someone to help get my son out and then the call cut off," he said.
Velez said he later learned that his family had been pulled from the rubble alive.