The unidentified suspect was found inside the Brooklyn apartment when police arrived Saturday, the New York Daily News reported.
"It's looking like a domestic violence case," a police official said.
Officials were investigating whether the suspect and any of the victims were related, The New York Times reported.
An 18-month-old boy and two girls, ages 6 and 9, were dead at the scene when paramedics arrived, while the 37-year-old mother and an 8-year-old boy died in area hospitals, police said.
A parent who wasn't home during the attack was inconsolable when he received the news from police through an interpreter, witnesses told the Daily News.
"The father was freaking out," neighbor May Chan said. "He just came home from work and saw the police and they told him. He was hysterical."
"I always see [the children] running around here," Chan said. "They run around by my garage playing. They run up and down screaming. They're little kids ... that's so heartbreaking. Innocent kids, my God."