Acting Essex County Prosecutor Robert Laurino said the shooting occurred at about 6 p.m. Friday.
Laurino said the officer fired one shot, striking the suspect in the chest.
The suspect was transported to University Hospital. Laurino said he was in grave condition.
The officer was taken to the same hospital for treatment of an undisclosed injury. Laurino said the officer was not shot.
The suspect's name was not released nor was that of the officer.
The prosecutor's office and the sheriff's department are investigating the circumstances of the shooting.