“Ajamila had named his son Narayana, and because he loved the boy very much, he would call him again and again. Although he was calling for his son, the name itself was powerful because the name Narayana is not different from the Supreme Lord Narayana. When Ajamila named his son Narayana, all the reactions of his sinful life were neutralized, and as he continued calling his son and thus chanting the holy name of Narayana thousands of times, he was actually unconsciously advancing in Krishna consciousness.
One may argue, “”Since he was constantly chanting the name of Narayana, how was it possible for him to be associating with a prostitute and thinking of wine?”” By his sinful actions he was bringing suffering upon himself again and again, and therefore one may say that his ultimate chanting of Narayana was the cause of his being freed. However, his chanting would then have been a nama-aparadha. Namno balad yasya hi papa-buddhih: one who continues to act sinfully and tries to neutralize his sins by chanting the holy name of the Lord is a nama-aparadhi, an offender to the holy name. In response it may be said that Ajamila’s chanting was inoffensive because he did not chant the name of Narayana with the purpose of counteracting his sins. He did not know that he was addicted to sinful actions, nor did he know that his chanting of the name of Narayana was neutralizing them. Thus he did not commit a nama-aparadha, and his repeated chanting of the holy name of Narayana while calling his son may be called pure chanting.
Because of this pure chanting, Ajamila unconsciously accumulated the results of bhakti. Indeed, even his first utterance of the holy name was sufficient to nullify all the sinful reactions of his life. To cite a logical example, a fig tree does not immediately yield fruits, but in time the fruits are available. Similarly, Ajamila’s devotional service grew little by little, and therefore although he committed very sinful acts, the reactions did not affect him. In the sastras it is said that if one chants the holy name of the Lord even once, the reactions of past, present or future sinful life do not affect him. To give another example, if one extracts the poison fangs of a serpent, this saves the serpent’s future victims from poisonous effects, even if the serpent bites repeatedly. Similarly, if a devotee chants the holy name even once inoffensively, this protects him eternally. He need only wait for the results of the chanting to mature in due course of time.”
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Sixth Canto, Chapter 02 – Text 49