Arjuna asks [Krsna] whether it is not a sin to wage war and slay friends and relatives in battle. It seems to us a natural and reasonable question. Sri Krsna Paramatman gives an answer in the Bhagvadgita. An action that outwardly seems to be bad and cruel need not necessarily be sinful. Acts that apparently cause pain to others may have to be committed for the good of the world and there is no sin in them. Then what action is sinful and what is meritorious? The Lord answers this question also. Only such deeds as are motivated by desire and hatred can be sin. Those performed for the well being of the world without being impelled by desire and hatred are meritorious even though they may seen to be cruel.
The question arises: Is there any action that does not spring from desire or hatred? I will give an example. When a judge awards punishment to a man found guilty of crime is he driven by desire or hatred? His sentence may seem cruel but it is indeed for the Atmic well-being of the accused himself. If one's son is suffering from advanced insanity does one not keep him in chains? Is that sinful? It is for the son's good as well for the good of others who might come to harm by him.
It is this manner that the sastras have kept us bound, ordering us to do this and that. It is for our benefit as well as the world's, says Sri Krsna, that we must live according to the tenets of the sastras: "Tasmatcchastram prmanam te karyakarya-vyvasthitau" (the sastras are the authority as to what you must do and must not). The Gita today enjoys wide esteem. Even people who have no respect for our religious customs and traditions - researchers, Western scholars, etc - speak in praise of it. They interpret variously the Gita's teaching on the svadharma. There is no room for doubt about what the Gita says about svadharma: It is the karma allotted to a man by the sastras.
When there is neither selfish desire nor hatred, there will be nothing unpleasant about any kind of work. One can then be always happy doing one's allotted work.
The reason for desire and hatred is ego-feeling, ahamkara. When there is no ego-sense, considerations of high and low, or inferior or superior, will be found meaningless. We will kept doing our work happily as a matter of duty and thus also contribute to the world's happiness. The Karmayoga taught by the Gita is doing one's work without ahamkara, in a spirit of dedications to the Lord. This tradition of desireless action that purifies our inner being has existed in this land from the Vedic period. Sri Krsna Paramatman presents it to us as a boon encased in a handy casket.
We must keep applying this teaching with ardour in every work and action of our life. Every time we do a work we must ask ourselves: "How do we benefit from this work? Will it bring us fame? Are we moved by desire or hatred? Are we being partial to somebody in carrying it out?" If there is any of these elements associated with our action it must be considered sinful even if it seems exalted to the outside world. If we do something on our own, dictated by our own desire, there will be much wrong-doing in accomplishing it. So, as Sri Krsna says, all our actions must be founded on the sastras. If everybody acts with equal love for all and with a pure heart there will be neither any rivalry nor any quarrel in society. The world then will be filled with joy.
For a general background, please see here