All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The scholars differed in opinion over the ruling of taking off one’s socks after having wiped over them and before the expiration of the time allotted to wiping over them:
1- According to the Hanafi School of jurisprudence, the later opinion of Imam Ash-Shaafi’i and a narration reported by Imam Ahmad, he has to wash his feet when he takes off his socks as the sequence in washing the parts of ablution is not compulsory.
2- If he washes his feet right after taking off his socks, then his ablution is valid. In case he delays washing his feet, he has to repeat his ablution. This is due to the lack of the condition of the sequence in washing the parts of ablution. This is the opinion of the Maaliki School of jurisprudence.
3- His ablution becomes invalidated by him taking off his socks. This is the earlier opinion of Imam Ash-Shaafi’i and it is the well-known opinion of the Hanbali School of jurisprudence.
4- Removing his socks does not affect the validity of the ablution and his ablution is correct [valid]. This is the preponderant opinion according to Imam Ibn Hazm and Ibn Taymiyyah as the ablution is confirmed to be correct and there is no evidence that it becomes invalidated by taking off one’s socks. There is also a narration which supports this opinion. Ibn Shaybah reported that Abu Dhibyan narrated: "Once I saw ‘Ali urinating while standing and then he performed ablution and wiped over his socks during ablution. When the Muaththin (the person who calls for the prayer) called for prayer, ‘Ali took his socks off and then led the people as Imam in prayer.”
This act is also in compliance with the correct juristic reasoning (deduction, analogy), because if a person wipes over his thick hair when performing ablution and then shaves it, his ablution is valid. Similarly, if someone takes off his socks after ablution and before the expiry of the duration allotted to the validity of wiping, then his ablution is also valid.
For more benefit, please refer to Fataawa 320902, 232978, 177013, 123758, and 346564.
Allah knows best.