Former non-commissioned officer Brahm Singh, 65, gunned down the dacoit Wednesday night in his house in Lal Bagh neighbourhood of Loni area, police said.
When the retired army man challenged the criminals they fired at him and he retaliated with his licensed rifle, police said.
After the exchange of fire stopped the criminal was found lying in an injured condition while his accomplices had escaped, police said.
The injured accused, identified as Sonu from Uttar Pradesh's Gajraula district, died on way to hospital, police said.
Superintendent of Police (Rural) Jagdish Sharma: "We are trying to nab the other criminals. Sonu's body has been sent for post mortem."