It happened just after 2 a.m. Wednesday outside a house on North Retta Street, which is east of downtown Fort Worth.
Police said a man got into a struggle with an armed intruder he found inside his home. He ran outside after being shot in the hand.
The suspect, 31-year-old Reginald McGregor, also ran outside and fired more shots in the direction of the victim and the officers who had just arrived at the scene, police said.
The officers returned fire, killing McGregor.
The victim was taken to the hospital for his gunshot wound, but the officers were not hurt.
There is dash cam video of the incident and a neighbor's surveillance camera may have also captured the shooting.
The officers involved were wearing body cameras, but they did not have enough time to turn them on, police said.
Those officers will be placed on routine administrative leave while the case is investigated.