He was wearing a bulletproof vest at the time, and deputies say that saved his life.
The shooting happened around 12:30 a.m. Wednesday when Deputy Quinton Goodwill stopped a car with Florida license plates in the 13700 block of Fondren near the Sam Houston Tollway.
When Goodwill walked up to the car, the suspect inside immediately fired shots at him, police say.
Audio from police dispatch captured the shooting as it unfolded.
"We have a deputy shot South Sam and Fondren at Metro Park and Ride. Looking for silver Honda Accord with Florida license plate," the dispatcher said.
Goodwill was hit twice in the upper chest.
"We checked out his whole body and looks like one round hit him in the chest, but the vest caught it. Did not penetrate through the skin," the dispatch audio continued.
Precinct 7 deputy constable alive and well thanks to his bulletproof vest pic.twitter.com/jb5Nx8nuw3— Jeff Ehling (@JeffEhlingABC13) August 21, 2019
Goodwill ran for cover during the shooting and was helped by a man who was passing by on a bicycle.
The deputy constable, who was taken to Memorial Hermann Hospital with non-life threatening injuries, was released from the hospital on Wednesday.
The suspect drove off but was later found several miles away at Orem and S. Post Oak.
Officials say the suspect made it easy to catch him because he did not have on his headlights, and a weapon was in plain sight.
"Fortunately, in this case, the deputy constable was wearing his vest, and I believe that saved his life tonight, and fortunately, the suspect who we believe did this act was taken into custody," said HPD Assistant Chief H. Gaw.
According to authorities, the suspect also had body armor in his car.
Goodwill is a 5-year veteran of the Harris County Toll Road Authority under precinct 7.
Follow Jeff Ehling on Facebook and Twitter.