Allah, the Exalted said: “He has succeeded who purifies it” (ash-Shams 91:9) and “He has succeeded who purifies himself” (al-Ala 87:14) Qatadah, Ibn Uyaynah and others said: ‘He has succeeded who purifies himself through obeying Allah and performing righteous deeds’. Al-Fara and al-Zajjaj said: ‘A soul has succeeded that Allah has purified and a soul has failed that Allah has corrupted’. Al-Walibi mentioned the same thing on the authority of Ibn Abbas, may Allah be pleased with him, in a way such that the chain of transmission was not connected. However that is not what was intended by the ayah. Rather what was intended is the first statement with its authoritative wording and meaning.
As for the wording ‘he who purifies it‘, the ‘he‘ part is considered in the Arabic language to be a relative pronoun and it necessarily refers back to the self. So when it is said: ‘A person has succeeded who purifies himself‘, the pronoun for ‘person’ in the Arabic word ‘purifies himself‘ is referred to by the word ‘who‘. This is an aspect of Arabic discourse about which there is no doubt in its correctness, just as it is said: ‘He has succeeded who fears Allah and has succeeded who obeys his Lord‘.
As for the meaning of ‘he has succeeded who Allah purifies‘, the pronoun does not continue referring back to the term ‘who‘ in the phrase. The pronoun in this case refers back to Allah and not the term for ‘he‘, and the pronoun of the object refers back to the previously mentioned ‘self‘. Thus neither the pronoun of the subject not the object refer back to the term ‘who‘. So the connection of the reference is dropped and this is not allowed [in the language].
Yes, if it is said: ‘He succeeded who Allah purifies his self‘ without a pronoun attached to the verb, or ‘who Allah purifies for him‘ with a feminine pronoun attached to the verb, or similar manners of speaking, the expression is correct. For this to be hidden from those grammarians who hold this view is strange. He would not say: ‘It has succeeded a soul [that] purifies itself‘, for indeed here ‘purifies itself‘ is an attribute for ‘itself‘, not a connection; rather He said: “He has succeeded who purifies it” (ash-Shams 91:9) So the phrase is connected due to the term for ‘who‘ not an attribute for it.
Also, he would not say: ‘It has succeeded the soul who purifies it‘, for indeed if that was said and the pronoun in the term ‘purifies it‘ is made to refer back to the name of Allah, it would be correct. If they pretended to say, ‘The assumption about “He has succeeded who purifies it” is that it is the ‘self‘ that ‘purifies it‘. They say: ‘The pronoun of the object in the term ‘purifies‘ refers back to the ‘who‘ and it [the term ‘who‘] is appropriate for the masculine and feminine, and the singular or plural. So the pronoun refers back to its feminine use and its feminzation is not literal. For this reason it is said: ” ‘He’ has succeeded” and it is not said: “It [feminine] has succeeded’. It is said to them: ‘This is also considering that it is outside the scope of eloquent use of language for it is only correct when the disclosure indicates that in the same manner and whoever… [this part of the text could not be recovered in the original manuscripts] based upon that the intended meaning for us and likewise His statement: “And among them are those who listen to you” (Yunus 10:42) and similar examples.
In this case, then there does not exist in the term ‘who‘ or in what comes after something that indicates that the intended meaning is the feminine term for ‘self‘, thus it is not allowed to intend with speech what does not contain proof of its intention; for indeed the Speech of Allah, lofty and sublime is He, is safeguarded from the likes of this. And if it is assumed to be possible for the pronoun of ‘purifies himself‘ [with a feminine pronoun] to refer to ‘self‘ and to ‘who‘ despite that the term ‘who‘ has no proof obligating its reference back to it, truly its reference to the feminine is more appropriate than its reference to what could possibly be masculine and feminine; while its being masculine demonstrates the lack of proof of the feminine for indeed when discourse has two possible meanings, its conveyance upon their most apparent is obligated. Whoever pretends that it is otherwise has exited well-known Arabic speech and the Qur’an is free from that. Deviating from what the surface of speech demonstrates and moving towards what is not demonstrated by it without proof is definitely not allowed, then how so with a text from he perspective of its meaning? For Allah has conveyed that piety and evil deeds are inspired. This has been expanded upon at some other point.
Gardens of Purification by Ibn Taymiyyah Pages 108-111