The deceased was identified as Nurul Haque alias Keru, son of Mazed Gazi of the upazila.
Police said he was wanted in 13 criminal cases.
Officer-in-charge of Keshabpur Police Station Jasim Uddin said they arrested Nurul on Thursday afternoon while he was stealing a motorbike in Chingrakhali area.
Police conducted a drive along with him at night to arrest Nurul’s accomplices in Begaripara where miscreants fired gunshots targeting police, he said.
Police also fired back in self-defence triggering the gunfight, leaving Nurul dead on the spot, the OC said.
The body was sent to the morgue of Sadar Hospital for autopsy, he added.
A shooter gun, one round of bullet and four sharp weapons were recovered from the spot, the OC said adding that a case has been filed in this regard.