The full text of Imam Ghazali’s Secrets of Fasting can be found, in translation, at: The Secrets of Fasting (pdf)
There is an excellent lecture by Dr. Abdal Hakim Murad on the Inner Dimensions of Fasting, here.
It should be known that there are three grades of fasting: ordinary, special and extra-special. Ordinary fasting means abstaining from food, drink and sexual satisfaction.
Special Fasting means keeping one’s ears, eyes, tongue, hands and feet — and all other organs — free from sin.
Extra-special Fasting means fasting of the heart from unworthy concerns and worldly thoughts, in total disregard of everything but God, Great and Glorious is He. This kind of Fast is broken by thinking of worldly matters, except for those conducive to religious ends, since these constitute provision for the Hereafter and are not of this lower world.
Those versed in the spiritual life of the heart have even said that a sin is recorded against one who concerns himself all day with arrangements for breaking his Fast. Such anxiety stems from lack of trust in the bounty of God, Great and Glorious is He, and from lack of certain faith in His promised sustenance.
To this third degree belong the Prophets, the true awliya and the intimates of God. It does not lend itself to detailed examination in words, as its true nature is better revealed in action. It consists in utmost dedication to God, Great and Glorious is He, to the neglect of everything other than God, Exalted is He. It is bound up with the significance of His words: ‘Say: “Allah (sent it down)”: then leave them to play in their vain discussions.’ [al-An’am, 6:91]
As for Special Fasting, this is the kind practiced by the righteous. It means keeping all one’s organs free from sin and six things are required for its accomplishment.
See Not What Displeases God
A chaste regard, restrained from viewing anything that is blameworthy or reprehensible, or that distracts the heart and diverts it from the remembrance of God, Great and Glorious is He. Said the Prophet, on him be peace: ‘The furtive glance is one of the poisoned arrows of Satan, on him be God’s curse. Whoever forsakes it for fear of God will receive from Him, Great and Glorious is He, a faith the sweetness of which he will find within his heart.’
Jabir relates from Anas that God’s Messenger, on him be peace, said: ‘Five things break a man’s Fast: lying, backbiting, gossiping, perjury and a lustful gaze.’
Guarding one’s tongue from idle chatter, lying, gossiping, obscenity, rudeness, arguing and controversy; making it observe silence and occupying it with remembrance of God, Great and Glorious is He, and with recitation of Quran. This is the fasting of the tongue. Said Sufyan: ‘Backbiting annuls the Fast.’ Layth quotes Mujahid as saying: ‘Two habits annul Fasting: backbiting and telling lies.’
The Prophet, on him be peace, said: ‘Fasting is a shield; so when one of you is Fasting he should not use foul or foolish talk. If someone attacks him or insults him, let him say: “I am Fasting, I am Fasting!”‘
According to Tradition: ‘Two women were Fasting during the time of God’s Messenger, on him be peace. They were so fatigued towards the end of the day, from hunger and thirst, that they were on the verge of collapsing. They therefore sent a message to God’s Messenger, on him be peace, requesting permission to break their Fast. In response, the Prophet, on him be peace, sent them a bowl and said: “Tell them to vomit into it what they have eaten.” One of them vomited and half filled the bowl with fresh blood and tender meat, while the other brought up the same so that they filled it between them. The onlookers were astonished. Then the Prophet, on him be peace, said: “These two women have been Fasting from what God made lawful to them, and have broken their Fast on what God, Exalted is He, made unlawful to them. They sat together and indulged in backbiting, and here is the flesh of the people they maligned!”‘
Closing one’s ears to everything reprehensible; for everything unlawful to utter is likewise unlawful to listen to. That is why God, Great and Glorious is He, equated the eavesdropper with the profiteer, in His words, Exalted is He: ‘Listeners to falsehood, consumers of illicit gain.’ [al- Ma’idah, 5:42]
God, Great and Glorious is He, also said: ‘Why do their rabbis and priests not forbid them to utter sin and consume unlawful profit?’ [al-Ma’idah, 5:63]
Silence in the face of backbiting is therefore unlawful. God, Exalted is He, said: ‘You are then just like them.’ [al-Nisa, 4:140] That is why the Prophet, on him be peace, said: ‘The backbiter and his listener are copartners in sin.’
Keeping all other limbs and organs away from sin: the hands and feet from reprehensible deeds, and the stomach from questionable food at the time for breaking Fast. It is meaningless to Fast — to abstain from lawful food – only to break one’s Fast on what is unlawful. A man who Fast like this may be compared to one who builds a castle but demolishes a city. Lawful food injurious in quantity not in quality, so Fasting is to reduce the former. A person might well give up excessive use of medicine, from fear of ill effects, but he would be a fool to switch to taking poison. The unlawful is a poison deadly to religion, while the lawful is a medicine, beneficial in small doses but harmful in excess. The object of Fasting is to induce moderation. Said the Prophet, on him be peace: ‘How many of those who Fast get nothing from it but hunger and thirst!’ This has been taken to mean those who break their Fast on unlawful food. Some say it refers to those who abstain from lawful food, but break their Fast on human flesh through backbiting, which is unlawful. Others consider it an allusion to those who do not guard their organs from sin.
Not to over-indulge in lawful food at the time of breaking Fast, to the point of stuffing one’s belly. There is no receptacle more odious to God, Great and Glorious is He, than a belly stuffed full with lawful food. Of what use is the Fast as a means of conquering God’s enemy and abating appetite, if at the time of breaking it one not only makes up for all one has missed during the daytime, but perhaps also indulges in a variety of extra foods? It has even become the custom to stock up for Ramadan with all kinds of foodstuffs, so that more is consumed during that time than in the course of several other months put together. It is well known that the object of Fasting is to experience hunger and to check desire, in order to reinforce the soul in piety. If the stomach is starved from early morning till evening, so that its appetite is aroused and its craving intensified, and it is then offered delicacies and allowed to eat its fill, its taste for pleasure is increased and its force exaggerated; passions are activated which would have lain dormant under normal conditions.
The spirit and secret nature of Fasting is to weaken the forces which are Satan’s means of leading us back to evil. It is therefore essential to cut down one’s intake to what one would consume on a normal night, when not Fasting. No benefit is derived from the Fast if one consumes as much as one would usually take during the day and night combined. Moreover, one of the properties consists in taking little sleep during the daytime, so that one feels the hunger and thirst and becomes conscious of the weakening of one’s powers, with the consequent purification of the heart.
One should let a certain degree of weakness carry over into the night, making it easier to perform the (tahajjud) and to recite the praises (awrad). It may then be that Satan will not hover around one’s heart, and that one will behold the Kingdom of Heaven. The Night of Destiny represents the night on which something of this Kingdom is revealed. This is what is meant by the words of God, Exalted is He:’We surely revealed it on the Night of Power.’ [al-Qadr, 97:1]
Anyone who puts a bag of food between his heart and his breast becomes blind to this revelation. Nor is keeping the stomach empty sufficient to remove the veil, unless one also empties the mind of everything but God, Great and Glorious is He. That is the entire matter, and the starting point of it all is cutting down on food.
Look To God With Fear And Hope
After the Fast has been broken, the heart should swing like a pendulum between fear and hope. For one does not know if one’s Fast will be accepted, so that one will find favor with God, or whether it will be rejected, leaving one among those He abhors. This is how one should be at the end of any act of worship one performs.
It is related of al-Hasan ibn Abil Hasan al-Basri that he once passed by a group of people who were laughing merrily. He said: ‘God, Great and Glorious is He, has made the month of Ramadan a racecourse, on which His creatures compete in His worship. Some have come in first and won, while others have lagged behind and lost. It is absolutely amazing to find anybody laughing and playing about on the day when success attends the victors, and failure the wasters. By God, if the veil were lifted off, the doer of good would surely be preoccupied with his good works and the evildoer with his evil deeds.’ In too full of joy to indulge in idle sport, while for one who has suffered rejection laughter will be precluded by remorse.
Of al-Ahnaf ibn Qays it is reported that he was once told: ‘You are an aged elder; Fasting would enfeeble you.’ But he replied: ‘By this I am making ready for a long journey, Obedience to God, Glorified is He, is easier to endure than His punishment.’
Such are the inwardly significant meanings of Fasting.