SB 3.27.21

śrī-bhagavān uvāca
animitta-nimittena
 sva-dharmeṇāmalātmanā
tīvrayā mayi bhaktyā ca
 śruta-sambhṛtayā ciram
Synonyms: 
śrī-bhagavān uvāca — the Supreme Personality of Godhead said; animitta-nimittena — without desiring the fruits of activities; sva-dharmeṇa — by executing one’s prescribed duties; amala-ātmanā — with a pure mind; tīvrayā — serious; mayi — unto Me; bhaktyā — by devotional service; ca — and; śruta — hearing; sambhṛtayā — endowed with; ciram — for a long time.
Translation: 
The Supreme Personality of Godhead said: One can get liberation by seriously discharging devotional service unto Me and thereby hearing for a long time about Me or from Me. By thus executing one’s prescribed duties, there will be no reaction, and one will be freed from the contamination of matter.
Purport: 

Śrīdhara Svāmī comments in this connection that by association with material nature alone one does not become conditioned. Conditional life begins only after one is infected by the modes of material nature. If someone is in contact with the police department, that does not mean that he is a criminal. As long as one does not commit criminal acts, even though there is a police department, he is not punished. Similarly, the liberated soul is not affected, although he is in the material nature. Even the Supreme Personality of Godhead is supposed to be in association with material nature when He descends, but He is not affected. One has to act in such a way that in spite of being in the material nature he is not affected by contamination. Although the lotus flower is in association with water, it does not mix with the water. That is how one has to live, as described here by the Personality of Godhead Kapiladeva (animitta-nimittena sva-dharmeṇāmalātmanā).

One can be liberated from all adverse circumstances simply by seriously engaging in devotional service. How this devotional service develops and becomes mature is explained here. In the beginning one has to perform his prescribed duties with a clean mind. Clean consciousness means Kṛṣṇa consciousness. One has to perform his prescribed duties in Kṛṣṇa consciousness. There is no necessity of changing one’s prescribed duties; one simply has to act in Kṛṣṇa consciousness. In discharging Kṛṣṇa conscious duties, one should determine whether, by his professional or occupational duties, Kṛṣṇa, the Supreme Personality of Godhead, is satisfied. In another place in the Bhāgavatam it is said, svanuṣṭhitasya dharmasya saṁsiddhir hari-toṣaṇam: everyone has some prescribed duties to perform, but the perfection of such duties will be reached only if the Supreme Personality of Godhead, Hari, is satisfied by such actions. For example, Arjuna’s prescribed duty was to fight, and the perfection of his fighting was tested by the satisfaction of Kṛṣṇa. Kṛṣṇa wanted him to fight, and when he fought for the satisfaction of the Lord, that was the perfection of his professional devotional duty. On the other hand, when, contrary to the wish of Kṛṣṇa, he was not willing to fight, that was imperfect.

If one wants to perfect his life, he should discharge his prescribed duties for the satisfaction of Kṛṣṇa. One must act in Kṛṣṇa consciousness, for such action will never produce any reaction (animitta-nimittena). This is also confirmed in Bhagavad-gītā. Yajñārthāt karmaṇo ’nyatra: all activities should be performed simply for Yajña, or the satisfaction of Viṣṇu. Anything done otherwise, without the satisfaction of Viṣṇu, or Yajña, produces bondage, so here it is also prescribed by Kapila Muni that one can transcend material entanglement by acting in Kṛṣṇa consciousness, which means seriously engaging in devotional service. This serious devotional service can develop by hearing for long periods of time. Chanting and hearing is the beginning of the process of devotional service. One should associate with devotees and hear from them about the Lord’s transcendental appearance, activities, disappearance, instructions, etc.

There are two kinds of śruti, or scripture. One is spoken by the Lord, and the other is spoken about the Lord and His devotees. Bhagavad-gītā is the former and Śrīmad-Bhāgavatam the latter. One must hear these scriptures repeatedly from reliable sources in order to become fixed in serious devotional service. Through engagement in such devotional service, one becomes freed from the contamination of māyā. It is stated in the Śrīmad-Bhāgavatam that hearing about the Supreme Personality of Godhead cleanses the heart of all contamination caused by the influence of the three modes of material nature. By continuous, regular hearing, the effects of the contamination of lust and greed to enjoy or lord it over material nature diminish, and when lust and greed diminish, one then becomes situated in the mode of goodness. This is the stage of Brahman realization, or spiritual realization. In this way one becomes fixed on the transcendental platform. Remaining fixed on the transcendental platform is liberation from material entanglement.