Here is the Sanskrit anuvad, Hindi anuvad, and English translation of Moksha-Sanyasa Yoga Chapter 18, Verse 18.17.
Sanskrit
यस्य नाहंकृतो भावो बुद्धिर्यस्य न लिप्यते । हत्वापि स इमाँल्लोकान्न हन्ति न निबध्यते ॥ १८.१७ ॥
Hindi
जिस पुरुष के अन्त:करण में ‘मैं कर्ता हूँ’ ऐसा भाव नहीं है तथा जिसकी बुद्भि सांसारिक पदार्थो में और कर्मों में लिपायमान नहीं होतीं, वह पुरुष इन सब लोकों को मार कर भी वास्तव में न तो मारता है और न पाप से बंधता है ।
English
He who is free from the bondages of selfishness, and is rid of all ill thoughts, and desires, even if he kills others in this world, he is not actually killing them (because he, in effect, is carrying out his prescribed duty which is actually the predetermined will of God). This person is not bound to this world by his actions in any way whatsoever, O Arjuna.