The boy was rescued two days after a four-member gang, led by criminal mastermind Divyateja, kidnapped him in Bengaluru and demanded a ransom of Rs 35 lakh, they said.
Divyateja was injured in shooting and later arrested along with three others.
Acting on a complaint from the boy's father, police launched a manhunt and tracked one of the gang members, who revealed that Divyateja was driving with the child in his car towards Kengeri, Bengaluru.
"In self-defense, we opened two rounds of fire. One of the bullets hit his right leg and he collapsed on the ground," the police said in a press release.
The accused was moved to Victoria Hospital, where he is undergoing treatment.