The incident happened at 32nd Street and Sixth Avenue, just after 5 p.m.
Chief James O'Neill with the NYPD said two officers responded to a call for a man trying to remove a boot from his car. During their response, officers ran into 32-year-old Joudeh Akram of Queens.
According to O'Neill, Akram pulled an 11-inch meat cleaver and ran. Officers tried to use a Taser on the suspect, but he kept running westbound on 32nd Street.
While running, the chief said Akram ran into the front grill of a marked police cruiser, at the same time as an off-duty detective tried to intervene.
O'Neill said Akram slashed the detective, who received a 6-inch gash. He's listed in serious condition.
The other officers at the scene then fired 18 shots at Akram, hitting him. He was taken to the hospital in critical condition.
A second officer is being treated for a possible graze wound from the shots fired by officers. Both officers are expected to survive.
PHOTOS: Shots fired near N.Y. Penn Station after officers attacked
Investigators said this does not appear to be a targeted attack - it appears to be an emotionally-disturbed person.
Video from a witness shows ambulances leaving the scene:
Victoria Ammirato said her office was on lockdown after the shooting - the elevators were shut down and all people in the office had to exit via stairwells.
I'm in that Fuse building, 10+ floors up. Literally heard the gunshots. OMG. https://t.co/5WYxfSyUuW— Nabalab (@nabalab) September 15, 2016
There was a large police presence in the area, all while commuters were trying to head home during the evening commute.