[Note, Imam al-Ghazali is using slightly different terminology here, referring to what we might know as the Nafs or Self as just the soul, not to be confused with the pure Ruh or soul. From our perspective, both are from inside of us and some might not even be able to tell the difference between the two.]
On the subjugation of the soul and the enmity of Satan
It is the duty of the intelligent person to overpower the desire of the soul with hunger. This is because hunger results in subjugating the enemy of Allah. The Messenger of Allah (saw) said: "Satan flows in the body of man just as blood flows in his body. So constrict his passage ways with hunger."
Some wise people have said that the person whose soul overpowers them becomes a prisoner in the love of its desires, confined in the prison of its sins, and it prevents his heart from benefits. The person who irrigates the land of the limbs with desires has in fact planted in his heart the tree of regret.
Allah created the creation under three categories.
(1) He created the angels, gave them intelligence, but did not give them desires.
(2) He created animals, gave them desires but did not give them intelligence.
(3) He created humans and gave them intelligence and desires.
So the person whose desires overpower their intelligence, then animals are better than them. And the person whose intelligence overpowers their desires, then they are better than the angels.
What do they mean by 'desire'?
If people understood the one fundamental principle about the human experience, then most of their problems would cease to exist. That is, the human experience is a subjective one. We are always going to be ruled by biases, it is up to us whether to accept the ones we mistakenly inherit as children or to consciously decide on our own as an attempt to guide our own lives in a direction of our choosing.
See all those updates on my blog where I quoted the Roman Stoics or newer Western philosophers like Descartes. Anything which pleases or displeases someone, including desires, is simply a judgement passed by the mind. One that is alterable. This is unanimous insight into our nature by all human civilizations. Some emphasize it, some do not.
It isn't simply a problem of indulging in desires, because even Islam allows for the fulfillment of basic desires. Or rather, needs. Islam recognizes needs. What turns a need into a desire? The specific expression of it. You need food and other people. The objective truth of the matter is any food or any people would do (or rather, what Allah says would do which is a little more specific). The subjective nature of our experience, however, leads people to conclude one kind or type of something is preferable to the other. This is due to desires being learned from constant exposure and/or socialization/indoctrination. So while we all know to what extent our desires should be controlled, our needs fulfilled, we tend to assume that our current state at any given moment actually means anything.
I need food. I like apples. I value apples over other food and tend to assume that this means something, that apples are therefore significant in some way and my desire for them a meaningful expression of my deeper soul or something. When the truth is, I learned that like for apples from a younger age. We're always learning, adapting, etc in this world, and it's impossible to know what's going on at a younger age when we start learning so much. Say apples in this case are forbidden by Allah for whatever direct or indirect harm they may cause. I know that to curb this desire, I can indoctrinate myself with a new preference. One that I choose. But I'm loathe to do so because... I think apples mean something, not realizing that this "feeling" of something deeper for the apples is merely another layer of manifestation of the desire to begin with. Desires permeate the highest levels of our consciousness and thought processes. They were imprinted into our subconscious minds from first (and repeated) exposure, and now the subconscious guides the conscious. It becomes difficult for me to realize that the only reason I like apples at all is because I had already gone through a period of adaption, socialization, indoctrination, orientation, whatever you want to call it. One that I had no choice or control over due to my young age. It is no more meaningful than anything else I might choose to re-indoctrinate myself with (probably less so, because I make a conscious choice in the latter).
If, as in this case, apples are bad, then I've formed "meaningful" attachments to bad things, and I'm well on my way to disaster because now my very soul is inclined to haraam. And all for what? Something that is seemingly random to the casual observer, completely without meaning or significance. The only significance to the lot that you're dealt in life, is that you have to deal with it. Not the 'lot' in and of itself. It's a means to an end. Everyone is given a 'lot' and everyone has to transcend it to become their own person, not a product of their times. The means is to reprogram yourself according to your own will and conscious choice, otherwise we would simply be products of whatever random occurrences combined to form our childhood, with no correlation to what is good or preferred by Allah. And this is the state of most of humanity today.
This thing, this "preference beyond the need" is a desire. And it is this which, if not ruled over by intelligence, turns men into animals. And if controlled by our intelligence (meaning, oriented in the proper direction for Allah), elevates us above angels.
We never respect desires. We only respect people and their souls/Selves, even if that includes an inability to reckon with their desires. Thus only a few things are made unlawful in Islam. If people want to waste time preferring one kind of food over another that is harder to obtain, so long as it does not take away from religious responsibilities and both are lawful, then it's okay. What's okay? Not the preference. But the inability by the person to control their Nafs, their weakness. Better to give some leeway rather than have people self-destruct under the burden. There are more important things to do than worry about food, such as ibadat and tasawwuf. The latter provides a means for circumventing the Nafs and defeating it if a direct attempt at resistance is impossible.
On negligence and inattention
Negligence increases remorse. Negligence removes bounties and comes as a barrier in fulfilling service to Allah. Negligence increases jealousy. Negligence increases rebuke and regret.
It is related that a pious person saw his teacher in his dream and so he asked him: "What is your greatest regret?" The teacher replied: "The regret [due to] negligence."
It is related that a pious person saw Dhu an-Nun Misri (ra) in his dream so he asked him: "What did Allah do to you?" He replied: "He made me stand before Him and said to me: 'O you who used to claim! O liar! You claimed to love Me but then you became unmindful of Me?'"
A poet says: "You are in negligence and your heart is inattentive. Your entire life has passed while your sins are still the same." (translated from Arabic)
It is mentioned in Uyun al-Akhbar that Shaqiq al-Balkhi (ra) said: People make three statements which they are very used to in their actions:
(1) They say: "we are the slaves of Allah" yet they do actions of free people. So this is contrary to their statement.
(2) They say: "Allah has guaranteed our sustenance." Yet their hearts are only satisfied with this world and gathering all its vanities. This is also contrary to their statement.
(3) They say: "It is inevitable for us to die." Yet they do deeds of a person who is not going to die. This is also contrary to their statement.
Therefore, my dear brother, you should think with which body you are going to stand before Allah, with which tongue you are going to answer Him, and what are you going to say when he questions you about every single thing - big and small. You should therefore prepare answers for the questions, and ensure the answers are correct. Fear Allah for He is fully aware of all that you do - be it good or evil. Allah then admonishes the believers that they should not abandon His orders and that they should believe in Him as one both in secrecy and in public.
Allah says: "He who is not pleased with My decision, who is not patient over what I afflicted him with, who is not grateful over My bounties and who is not content with what I give him, then he should look for a Sustainer apart from Me."
A person said to Hasan al-Basri (ra): "I do not experience any enjoyment in obedience to Allah." So he said to him: "You probably looked at someone who does not fear Allah." Worship demands that you abandon everything solely for Allah.
A person said to Abu Yazid (ra): "I do not experience any enjoyment in obedience to Allah." So he said to him: "That is because you are worshipping acts of obedience and not worshipping Allah. Worship Allah so that you experience enjoyment in acts of obedience."
It is related that a person commenced salah and when he came to the words "You alone do we worship", the thought crossed his mind that he is really worshipping Allah. An announcement was made in his heart: "You are lying. You are actually worshipping the creation." So he repented and remained aloof from people. He then started his salah again and when he came to the words "You alone do we worship", an announcement was made: "You are lying. You are actually worshipping your wealth." So he gave all his wealth in charity. He then started his salah again and when he came to the words "You alone do we worship", an announcement was made: "You are lying. You are actually worshipping your clothing." So he gave all his clothes in charity except what he really needed. He then started his salah again and when he came to the words "You alone do we worship", an announcement was made: "Now you are speaking the truth. You are really worshipping your Sustainer."
Allah says: "He who desires the plantation of the hereafter, We give him more in his plantation. And he who desires the plantation of this world" (26:20), i.e. the pleasures of clothing, food and drink of this world, "We give him some of it and there is no share whatsoever for him in the hereafter." (59:19) In the sense that love for the hereafter is removed from his heart. It is for this reason that Abu Bakr (ra) spent 40,000 dinars on the Prophet (saw) in secrecy and 40,000 dinars in public - to the extent that there remained nothing with him. As for the Prophet (saw), he shunned the world, its desires and its pleasures - he and his family. It is for this reason that when the Prophet (saw) got his daughter, Fatimah (ra), married to Ali (ra), her dowry was merely a tanned piece of sheep leather and a leather pillow whose filling was fibres.
That last anecdote was intended by Imam al-Ghazali (ra) for the prevailing sentiments of the audience of his time, in which marriage was used as a means to greater wealth and status. It is still used predominantly for that in much of the world, but that might be alien to those of us who've lived in the West. It is still used as a means to a worldly end, but the desire is not solely for wealth or status for the majority of people but for aesthetics and (over)indulgence in lust (keeping in mind that Islamic society was very open with regards to sexuality compared to Western society in Imam al-Ghazali's (ra) time so lust does not mean sex... it means specifically the sexual instinct separated from the rest of the thought processes and emotions which should govern it, so it functions like it does in animals initially then eventually strays even from that and descends into the demonic).
Source: An Exposition of The Hearts by Imam al-Ghazali (ra)