Mingdong Chen admitted that he killed his cousin's wife, 37-year-old Qiao Zhen Li, and her children, 9-year-old Linda, 7-year-old Amy, 5-year-old Kevin and 1-year-old William Zhou in October 2013.
The 27-year-old Chen showed no reaction as he entered his plea. Under a deal with prosecutors, he must spend at least 125 years in prison before becoming eligible for parole.
Prosecutors said Li called her mother-in-law in China on the evening of Oct. 27, 2013, saying Chen was in the house with a knife and threatening the family. When the mother-in-law heard children crying in the background, she called other relatives in New York, and they rushed to the home in Brooklyn's Sunset Park neighborhood. By the time they arrived, the five relatives were dead and Chen was dripping in blood.
Police said the family had been slaughtered, each of the five repeatedly stabbed and slashed in the throat and neck. Their bodies were found strewn about the house, where Chen had been staying for about a week.
When detectives questioned Chen, he told them he was jealous of the success of his fellow Chinese immigrants, police said. Relatives said he had been fired from different restaurant jobs.
But what set off Chen's rampage remained a mystery to family members, prosecutors and the judge.
"The question is why he'd do these things," state Supreme Court Judge Vincent Del Giudice said. "It really doesn't much matter."
Assistant District Attorney Mark Hale said prosecutors offered Chen the deal because it would spare Li's husband and other relatives from having "to relive the worst day of their lives." Hale said they also wanted to ensure that Chen would publicly admit the killings.
Li's husband was in court on Wednesday but declined to comment.
In 2014, a judge ruled that Chen was not competent to stand trial because he had exhibited signs of mental illness that made him incapable of being able to assist in his defense.
Del Giudice said Wednesday that Chen appeared to "be clear, lucid and competent." He said he accepted the plea deal under the condition that Chen would "be incarcerated until the day he dies."