حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا رَوْحُ بْنُ الْقَاسِمِ، عَنِ الْعَلاَءِ بْنِ عَبْدِ الرَّحْمَنِ بْنِ يَعْقُوبَ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ قَالَ اللَّهُ تَبَارَكَ وَتَعَالَى أَنَا أَغْنَى الشُّرَكَاءِ عَنِ الشِّرْكِ مَنْ عَمِلَ عَمَلاً أَشْرَكَ فِيهِ مَعِي غَيْرِي تَرَكْتُهُ وَشِرْكَهُ ‏"‏ ‏.‏
Translation
Ibn Abbas reported Allah's Messenger (ﷺ) as saying

If anyone wants to have his deeds widely publicised, Allah will publicise (his humiliation). And if anyone makes a hypocritical display (of his deeds) Allah will make a display of him.

Comment

The Book of Zuhd and Softening of Hearts - Sahih Muslim 2986

This hadith from Sahih Muslim addresses the grave sin of riyā' (ostentation) and the divine recompense for those who seek worldly recognition for their deeds.

Exposition of the Text

The phrase "wants to have his deeds widely publicised" refers to performing acts of worship not for Allah's pleasure but to gain reputation, praise, or status among people. This corrupts the sincerity (ikhlāṣ) required for all worship.

"Allah will publicise his humiliation" signifies that Allah will expose such a person's hidden faults and shortcomings, making apparent what they sought to conceal, either in this world through disgrace or in the Hereafter before all creation.

Scholarly Commentary

Ibn Rajab al-Hanbalī explains that riyā' is the "minor shirk" as it involves associating others with Allah in intention. The punishment matches the crime: as one sought fame, Allah gives them infamy; as they displayed false piety, Allah exposes their reality.

Al-Nawawī states this hadith warns against any desire for repute in religious matters. The true believer performs deeds secretly, seeking only Allah's acceptance, knowing He rewards what is hidden.

Practical Implications

Muslims must constantly examine their intentions (niyyah), seeking refuge from showing off. The righteous predecessors would conceal their good deeds as people hide their sins.

This teaching emphasizes that the value of deeds lies in their sincerity, not their visibility. The believer works for the Unseen Witness rather than mortal spectators.