Praise be to Allah.
This hadith was narrated by al-Tirmidhi, (Kitaab Sifat al-Qiyaamah wa’l-Wara’, 2429), where the wording is, “Whoever shames his brother for a sin will not die until he does it too.”
Shaykh al-Albaani described this hadith in Da’eef al-Jaami’ (5710) as mawdoo’ (fabricated).
If a hadith is da’eef (weak) and mawdoo’ (fabricated), it cannot be taken as a basis for rulings or be acted upon.
With regard to the meaning of the hadith, Shaykh al-Mubaarakfoori said:
“ ‘Whoever shames’ means whoever criticizes or condemns. ‘his brother’ means his brother in faith. ‘For a sin’ means one from which he has repented, according to the way in which Imaam Ahmad explained it. ‘will not die’ – the subject of this verb is ‘whoever’. ‘Until he does it too’ means, the sin for which he criticizes his brother. It is as if the one who criticizes his brother will be forsaken by Allah until he commits the sin for which he criticized his brother, if that criticism was accompanied by self-admiration for being free of that sin.”
(Tuhfat al-Ahwadhi, 7/173)
The fact that this hadith is da’eef (weak) does not mean that it is permissible to criticize those who have fallen into sin, for those who fall into sin are of different types.
Some of them repent and turn back to their Lord, or else the punishment (hadd) is carried out on them. So it is not permissible to criticize them because their souls have been purified by their repentance or the punishment. The Prophet (peace and blessings of Allah be upon him) said: “The one who repents from sin is like one who has never sinned.” (Narrated by Ibn Maajah, 4240; classed as saheeh by al-Busayri in al-Zawaa’id, commentary on Sunan Ibn Maajah).
Imam Ahmad said that the punishment mentioned in the hadith is for the one who criticizes a person who has repented from his sin, as al-Tirmidhi narrated from him. After narrating this hadith, he said: Ahmad said: from a sin from which he has repented.
Some of them commit sin but they do not do it openly. Anyone who comes to know of that has to advise the person and cover his faults.
And some of them commit sin openly. They should also be advised, and others should be warned against them to whatever extent is appropriate.
Ibn al-Qayyim (may Allah have mercy on him) said:
It may be that what he meant is that your criticizing your brother for his sin is an even greater sin than his, because it means that you feel pride in your obedience and you are praising yourself for that, and claiming to be free from sin, whereas your brother has fallen into sin. But it may be that his feeling humble because of his sin and what has happened to him, such as his feeling humble and submissive, thinking less of himself, ridding himself of pious pretensions, arrogance and self-admiration, standing before Allah with his head bowed, his gaze lowered and his heart broken – it may be that all of that is better for him than your feeling proud of your obedience, thinking that you are doing much good, believing that by doing so you are important, and reminding Allah and mankind of that.
How close this sinner is to the mercy of Allah, and how close this conceited one is to the wrath of Allah! A sin that leads to humility is more beloved to Him than an act of obedience which fills a person with conceit. If you sleep all night then wake up feeling regret (for not having prayed qiyaam al-layl), that may be better for you than if you were to pray all night and wake up in the morning filled with self-admiration. For the deeds of the one who admires himself are not accepted. Perhaps your laughing whilst admitting to shortcomings is better than your weeping with piety but being filled with conceit. The groaning of the sinners is more beloved to Allah than the tasbeeh of the conceited. It may be that by means of this sin, Allah has caused him to drink the medicine that will cure a fatal disease which you also have, but you do not realize it. Allah has reason for what He does to both those who are obedient and those who sin, which are known to no-one except Him, and which no one recognizes except those who have insight, and then only within the limits of human understanding; beyond that there are reasons which are not even known to the honourable scribes (i.e., the recording angels). The Prophet said: “If the slave woman of any one of you commits adultery, let him carry out the punishment on her and not criticize.” And Yoosuf (peace be upon him) said: “No reproach on you this day” [Yoosuf 12:92 – interpretation of the meaning]. For the scale is in the hand of Allah, and the ruling is His. The point is to carry out the punishment (prescribed by Allah) and not to shame and criticize. No one feels safe from what has been decreed for them and from the power of His decree except those who are ignorant of Allah. Allah said to the one who had more knowledge of Him than anyone else and was closer to Him: “And had We not made you stand firm, you would nearly have inclined to them a little”[al-Israa’ 17:74 – interpretation of the meaning]. And Yoosuf said: “Unless You turn away their plot from me, I will feel inclined towards them and be one (of those who commit sin and deserve blame or those who do deeds) of the ignorant”[Yoosuf 12:33 – interpretation of the meaning]. One of the ways in which the Messenger of Allah used to swear was “No, by the One who turns hearts.” And he said, “There is no heart which is not between two of the fingers of the Most Merciful. If He wills He guides it aright and if He wills He sends it astray.” Then he said, “O Allah, the one Who turns hearts over, make our hearts steadfast in adhering to Your religion. O Allah, musrif al-Quloob, sirf our hearts to obey You.”
Madaarij al-Saalikeen, 1/177, 178)
And Allah knows best.