The incident happened around 7 a.m. on Van Dam Street in Long Island City, outside the Queensboro Correctional Facility.
Police say the 47-year-old woman got into a dispute with her boyfriend, also a corrections officers, and fired a shot at him. She missed, hitting a car instead.
She then turned the gun on herself, shooting herself in the chest, according to authorities.
"The correction officer was chasing a guy, I don't know who it was," said a witness who was sitting in the car that was struck by the bullet. "She took about five shots. One of the bullets hit the car I was in...then she followed him down the block, then she came back about five minutes later and shot herself."
She was pronounced dead at Elmhurst Hospital.
Queensboro Correctional Facility is a state-run facility, and the state Department of Corrections spokesperson Thomas Mailey issued the following statement:
"This morning there was a tragic incident outside of the Queensboro Correctional Facility involving two correction officers. At no time was security to the facility breached. As a precaution, the facility is operating on a modified schedule. The Department is assisting the New York City Police Department in its investigation."
The victim's identity has not been released.