SB 11.11.14

yasya syur vīta-saṅkalpāḥ
 prāṇendriya-mano-dhiyām
vṛttayaḥ sa vinirmukto
 deha-stho ’pi hi tad-guṇaiḥ
Synonyms: 
yasya — of whom; syuḥ — they are; vīta — freed from; saṅkalpāḥ — material desire; prāṇa — of the vital energy; indriya — the senses; manaḥ — the mind; dhiyām — and of intelligence; vṛttayaḥ — the functions; saḥ — such a person; vinirmuktaḥ — completely freed; deha — in the body; sthaḥ — situated; api — even though; hi — certainly; tat — of the body; guṇaiḥ — from all of the qualities.
Translation: 
A person is considered to be completely liberated from the gross and subtle material bodies when all the functions of his vital energy, senses, mind and intelligence are performed without material desire. Such a person, although situated within the body, is not entangled.
Purport: 

The material body and mind are subject to lamentation, illusion, hunger, lust, greed, insanity, frustration, etc., but one who remains active in this world without attachment is considered vinirmukta, or completely liberated. The vital energy, senses, mind and intelligence are purified when engaged in the devotional service of Lord Kṛṣṇa, as confirmed throughout Śrīmad-Bhāgavatam.