Bhagavad Gita · 16.23
यः शास्त्रविधिमुत्सृज्य वर्तते कामकारतः।न स सिद्धिमवाप्नोति न सुखं न परां गतिम्॥
yaḥ śhāstra-vidhim utsṛjya vartate kāma-kārataḥ na sa siddhim avāpnoti na sukhaṁ na parāṁ gatim
One who discards the injunctions of the scriptures and acts according to the impulse of desire attains neither perfection, nor happiness, nor the supreme destination.
— Bhagavad Gita 16.23
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)