The suspect has been identified as 30-year-old Edward Archer.
Officer Jesse Hartnett, 33, was hit three times in the left arm night and suffered "some very serious injuries that will require multiple surgeries," police Commissioner Richard Ross was quoted as saying by CNN.
The attacker was armed with a 9mm Glock 17.
According to reports, the gun, which the attacker used, was stolen from the home of a police officer in 2013.
Capt. James Clark, commander of the homicide unit, told CNN the suspect said to investigators: "I follow Allah. I pledge my allegiance to the Islamic State and that's why I did what I did."