It happened around midnight outside the Tia Pancha flea market, which also houses a nightclub, on Airline near Gulf Bank.
Investigators say several deputies were working a second job as security guards at the club when they spotted two men in a truck in the parking lot.
Two deputies in uniform approached the men, getting close enough to shine flashlights into the truck.
Deputies say they could see a gun on the passenger side. Authorities then told the suspects to get their hands up, but the deputies say the passenger reached for that gun and one of the deputies fired.
"The passenger at some point during that instance decided he was going to reach for the gun. The deputy discharged the weapon once, striking the subject. He is DOA in the vehicle," said Lt. Chris Sandoval with the Harris County Sheriff's Office.
Officials say the driver, who was arrested, also had a gun. He was not hurt.
According to investigators, there have been issues in the parking lot in the past and that's why the deputies approached the truck.
Authorities tell Eyewitness News the truck the men were in may have been stolen during an aggravated robbery earlier in the evening.
The shooting is now being investigated by the district attorney's office to determine if the deputy acted correctly.
Follow Jeff Ehling on Facebook and Twitter.