You were optimistic about the days when it was well with you,
And you did not fear the evil which fate brings;
And the nights made you feel safe and you were deceived by them,
For with clear nights comes the onset of murkiness.
Imām al-Ghazālī identifies two major causes which can lead to a person being sealed with an evil ending (May God protect us). The gist of which is that the first is the erroneous belief concerning God which cannot be mitigated by practical piety; the second, weakness of faith in the root and the mastery of the love of the world. With respect to the first cause it may operate through a man’s active participation in speculative theology or through his acceptance on authority of the results of speculation. Here the extremely serious view which al-Ghazālī takes of intellectual error in relation to the doctrine of God is clearly seen. Such error taints not only the thinking of a few speculative minds, but also the beliefs of the many, before whom the Scholars exhibit the wares of their intellects. It is these considerations that regulate his generally unfavourable attitude to speculative theology.
You can find the full text in ‘The Revival of the Religious Sciences (Ihyā ulūm al-dīn)’ in the book regarding Fear and Hope. I have included excerpts below:
“And the simple folk are far from this danger. I mean those who believe in God and His Messenger and the Last Day with a comprehensive and firmly-rooted faith, such as the bedouin and the negroes, and the rest of those common folk who have not waded into research and enquiry nor wallowed in systematic theology as if it were an absolute standard of reference. Nor have they inclined to the different kinds of systematic theologians, accepting on authority their divergent sayings; and, for that reason, he (Muhammad) said: The majority of the people of the Garden are simple folk.
And, for that reason, the Fathers proscribed research and enquiry and the wading into systematic theology and the examination of these matters. And they commanded the people that they should restrict themselves to believing in what God has revealed in its totality and to what has come from meanings that are plain, along with its affirmation that analogy should be disowned. And they forbade them to wade into allegorical exegesis, because the danger involved in research into the attributes of God is great, and its ascents are steep and its paths are rugged, and the intellect comes short of attaining to the majesty of God. And the guidance of God with the light of assurance is veiled from human hearts according as they bear the inborn impress of the love of the world.”
And only God knows best.