Ref. Gita 2.62-63
Here desire (kama) is defined as arising out of an attachment to some object, want for it gives rise to greed (lobha) and denial of it gives rise to anger (krodha).
I would like to elaborate this concept of desire more. Desire is of two types IMHO - static & dynamic. Dynamic is the desire which wants to possess objects one doesn't have, Static is the desire to maintain possession of what one has. This static desire gives rise to even greater krodha than dynamic desire. Another very important emotion involved because of static desire is "fear" - one fears loss of possessions. Then when one is separated from one's possessions, it potentially can give rise to anger. For e.g. if someone were to humiliate you in front of a lot of people, then one is shorn of one's key possession - prestige, honor and that gives rise to anger. When one finds his position helpless, anger gives way to sorrow and dejection. From this arises the desire for revenge, which then evolves into higher complexes like obsession etc.
Dynamic Desire ---> Greed to get----> Anger when one doesn't get
Static Desire ----> Fear of Loss
Static Desire----> Anger on losing the object----> Sorrow when one is helpless and can't prevent the loss
Ego (Ahamkara), of course, is the root cause of all desires. When one sees oneself as separate, as a separate "I", then one wants to relate with objects outside. This causes attachment (sanga), which leads to desires (kama).
Bhagavad Gita says that lose your Ego by recognizing the Supreme Lord in all beings and recognizing the Supreme Lord within oneself
"Sarva bhutastham atmanam, sarvatra sama darshanah
Yo mam pasyati sarvatra, sarvam cha mayi pasyati
Tasyam cha pranasyami sa cha me na pranasyati"
"He who sees Me everywhere, and sees everything in Me,
to him I am never lost, and he is never lost to Me"
Parts of Gita 6.29-30 as translated by Swami Krishnananda
Then the question emerges in the enquirer's mind, like an Arjuna as to how would he go about killing enemies at war, when he is supposed to see God in them.
This is partly answered in the 2nd chapter and also in later chapters. In the 2nd chapter the concept of soul or atman is explained and the Lord tells Arjuna that the "soul never kills, nor is killed. it's only the body that perishes". So Arjuna is not really killing anyone or acruing any "papa" by desireless action. The other part, as explained in later chapters is that Arjuna has to discharge duties as per his svadharma, offering everything to God, surrendering to God, without any desire for fruits for himself. he is but a devoted instrument of God, doing what is expected of him, as per his Nature (makeup of Gunas)