Police say the officer, assigned to the 49th Precinct, arrived at the Rhinelander Avenue apartment building in the Morris Park section of the Bronx at 12:30 a.m., responding to a report of a dispute with a man with a knife.
He confronted 48-year-old Paul Goldreyer in a fifth-floor apartment and tried to get the suspect to surrender, but he refused.
Police say Goldreyer then lunged at the officer, who fired his weapon.
Goldreyer was hit multiple times, including once in the chest. He was pronounced dead at scene.
Neighbors believe he had a history of mental problems and may have been placed in the building by an agency assisting those trying to re-enter society.
Police say the incident began when Goldreyer threatened his roommate with with another knife. The roommate was unhurt.
The officer was not injured, but was treated for trauma.