Chapter XVIII · Śloka 6
एतान्यपि तु कर्माणि सङ्गं त्यक्त्वा फलानि च ।
कर्तव्यानीति मे पार्थ निश्चितं मतमुत्तमम् ॥
etāny api tu karmāṇi saṅgaṃ tyaktvā phalāni ca |
kartavyānīti me pārtha niścitaṃ matam uttamam ||
Even these actions should be performed relinquishing attachment and fruit — this, O Pārtha, is my definite and highest conviction.
The key qualifier is detachment: obligatory acts must be done, but freed from personal clinging and expectation of reward. This is the essence of karma-yoga as the highest practical teaching.