A sheriff's spokesperson says the deputy tried to stop the suspect for an unknown reason near 10th Street East and Avenue Q4 Sunday night.
The man pulled a gun and fired at the deputy, injuring him as he took cover behind his squad car. The deputy returned fire.
The suspect drove off, prompting a brief pursuit. He later forced his way into the home of an elderly woman, but eventually surrendered when deputies surrounded the house.
The suspect, identified as Dejon King, has been booked for investigation of attempted murder.
The deputy, who has not been identified, remained hospitalized Monday in stable condition.
The Associated Press contributed to this story.