Bhagavad Gita 2.47
Chapter 2: The yoga of knowledge
कर्मण्येवाधिकारस्ते मा फलेषु कदाचन ।
मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि ॥ ४७ ॥
Thy business is with the action only, never with its fruits; so let not the fruit of action be thy motive, nor be thou to inaction attached.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.