Bhagavad Gita: Chapter 2, Verse 51

कर्मजं बुद्धियुक्ता हि फलं त्यक्त्वा मनीषिणः ।
जन्मबन्धविनिर्मुक्ताः पदं गच्छन्त्यनामयम् ॥ २-५१ ॥

karma-jaṁ buddhi-yuktā hi phalaṁ tyaktvā manīṣiṇaḥ
janma-bandha-vinirmuktāḥ padaṁ gacchanty anāmayam 2.51

By thus engaging in devotional service to the Lord, great sages or devotees free themselves from the results of work in the material world. In this way, they become free from the cycle of birth and death and attain the state beyond all miseries.