The New York City Police Department said a girl called to report the incident in Queens' Far Rockaway neighborhood and said "her cousin is killing her family members".
The suspect, a 38-year-old, stabbed two police officers who responded to the scene, police told reporters.
One of the officers then shot him dead, they added.
The four people stabbed to death included a 12-year-old boy, an 11-year-old girl, a 44-year-old woman and a man in his 30s, police said.
A fifth person, a 61-year-old woman, was also stabbed and was in hospital in critical condition, police said.
Persons:
Kanishka Singh, Lisa Shumaker
Organizations:
New York City, The New York City Police Department, Thomson
Locations:
Queens, New York, Rockaway, Washington