The war of Kurukshretra - Mahabharata - became inevitable, as the last efforts to find negotiated solution by Sri Krishna also proved futile. Duryodhana was not ready for any compromises. The two armies confront each other on the battlefield where Arjuna passes through a terrible phase of remorse and melancholy - vishaad. Sri Krishna tells him the Gita to allay his doubts about various paths, including Karma and worldly duties, to reach the highest Truth.
What starts as a dialogue between two friends, turns into a spiritual discourse between God and a sadhaka. As if Sri Krishna was waiting for the proper opportunity to express and impart true spiritual knowledge for the welfare of the human race.
In the second chapter, Sri Krishna touches upon the Jnana Yoga (Sankhya Yoga) and Arjuna misinterprets its relevance by supposing the path of Jnana to be superior to path of Action. Thus the third Chapter begins with Arjuna putting the question:
"O Keshava, if you say that Jnana is superior to Karma, then why do you insist upon me to getting involved in this ghastly and terrible war?" Will it not be better if I take to sannyasa and lead the life as a monk? The great blood shed and killings of near and dear ones would thus be avoided.
Whether such feeling arose out of real pity, concern, and compassion; or whether it was the result of cowardice and fear we do not know. Sri Krishna, however, knew that such thoughts did not augur well for the progress of seekers of Truth. It was necessary to re-establish the glory of selfless work as the valid path to realization of Atman. The impact of Jnana based philosophy of those times was creating a wave of false adherence to Jnana, as many sadhakas did not possess requisite qualification to undertake such sadhana of Jnana Yoga. This created an escapist trend in the social behavior in the form of running away from the responsibilities and duties necessary for individual and collective welfare and growth.
Therefore, Sri Krishna says to Arjuna, 'Your only duty is to act (right to work) and not to hanker after the fruits (or the results) thereof.' (Gita Chapter II: 47) Be not the purpose of your actions. Let not the work bind and blind you. Work with total non-attachment and selfless attitude. Forgo all the idea of 'doership' in favor of the Lord, and with full concentration get engaged in the work at hand, i.e. the battle against the enemy. This will become Yoga for you, for 'excellence in the work is itself Yoga'.
How does excellence in work become Yoga? By preparing the mind to comprehend the essential function of Yoga i.e. to attain the purity of mind and reason through service and selflessness. To achieve excellence one must control the mind so that requisite concentration can be achieved. With practice, this control over senses and the mind reaches the degree of perfection where sadhaka can understand the value and necessity of selfless service and renunciation to enjoy the higher state of bliss. The concentrated mind can fathom its own mysteries. Then even though the person may appear to be fully engaged in the activities he is enjoying 'the state of freedom' that his actions - spiritual disciplines - have made possible for him. Like a free bird, his mind hankers for the freedom to roam in the realm of Absolute.
Sri Krishna tells about valid actions, inaction, and improper or prohibited actions. Whatever the scriptures advocate should be accepted as correct action.
Similarly, the great sages and seers, prophets and avatars also are sources for determining beneficial karma. One should follow their advice. Actions that must be shunned are those which go contrary to scriptural dictates. Such actions like hoarding, engaging in corrupt practices, bribery, doing harm to others, excessive lust, greed, hatred, jealousy, etc. make the person selfish and bind him to body-mind complex. Therefore, these are not proper karma.
The stage of inaction is quite confusing. As already mentioned, most people under the distorted pretext of Jnana become lazy and give up all good work. Their inaction falls under the category of 'tamasik inactivity' - delusory and selfish actions. Such people cannot compare themselves with 'inactive' but illumined and stoic Yogis. Real inaction is gradual process of renunciation borne out of the glimpses of one's true nature. As a pregnant woman gradually is freed from daily routine as the term matures, and is required to concentrate on bare minimum activities essential for the timely and safe delivery, so also a sadhaka is relieved of his duties and karma to seek the Absolute. This is the state of desirable inactivity, which come through the practice of Karma Yoga itself!
One important caveat must to be interposed here. For, as with Jnana, excessive emphasis on philanthropy is also likely to distract us from our aim of God realization. Therefore, Sri Ramakrishna advises us all, 'Don't go out of your way to look for such works. Undertake only those works that present themselves to you and are of pressing necessity - and those also in a spirit of detachment.' Real aim in life is realization of God. Selfless work is difficult in this age, and at most can be a means to the end of seeking God. Sooner one is freed from the bondage of duties and responsibilities, better are the chances to seek the Divine.
While Sri Krishna was the first great person to introduce the concept of Karma Yoga, in addition to Raja, Jnana, and Bhakti, Swami Vivekananda has elaborated all the four Yogas in his lectures to western audience during his four-year stay in USA and the UK.