Sins do not Become Good Deeds Based on Intention

Imām al-Ghazālī states:

‘Sins do not change from their nature because of (good) intention. An ignoramus should not (mis)understand this from the general statement of the Prophet (upon him peace): “Actions are based on intentions”, and assume that a sin transforms into obedience based on intention – like someone who backbites a person in consideration of the feelings of another, or feeds a poor person using the wealth of another, or builds a madrasa or masjid or convent using unlawful wealth, and his intention is good. All this is ignorance, and intention has no impact in removing it from being injustice, transgression and sin. In fact, his intending good from evil against the demands of Sharī‘ah is another evil! If he knows this, then he has opposed the Sharī‘ah, and if he is ignorant of it, then he is sinful on account of his ignorance, since acquiring knowledge is obligatory on every Muslim. Virtues are only recognised as virtues from the Sharī‘ah – so how can evil possibly be good?! How very farfetched! In fact, that which propels this in the heart is hidden passion and concealed desire, since when the heart desires position, attracting people’s hearts and all other gains of the lower self, Shayṭān uses it to deceive the ignoramus. This is why Sahl al-Tustarī, Allāh have mercy on him, said, “Allāh is not disobeyed with a sin greater than ignorance.” He was asked, “Abū Muḥammad, do you know anything worse than ignorance?” He said: “Yes, being ignorant of one’s ignorance!”’ (Iḥyā’ ‘Ulūm al-Dīn, Dār al-Minhāj, 9:31-2)