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

He who wants to publicise (his deeds), Allah will publicise (his humility), and he who 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 2987 a

Hadith Text

"He who wants to publicise (his deeds), Allah will publicise (his humility), and he who makes a hypocritical display (of his deeds), Allah will make a display of him."

Commentary on Intentions

This noble hadith addresses the critical matter of intention (niyyah) in worship and deeds. The one who performs righteous acts with the desire for people's praise seeks worldly recognition rather than divine pleasure.

Allah's response is measured and just - as the servant sought publicity for his deeds, Allah will expose his true state of humility before people, revealing the insincerity that motivated his actions.

The Danger of Riya' (Show-off)

The second portion warns against riya' - performing acts of worship to be seen by others. This subtle shirk (associating partners with Allah) corrupts the very foundation of faith.

Allah's punishment for such hypocrisy is severe - He will expose the hypocrite's true nature on the Day of Judgment before all creation, making manifest what they sought to conceal.

Spiritual Remedy

The scholars advise constant vigilance over one's intentions, frequent self-assessment, and seeking refuge in Allah from the evil of ostentation. Concealing good deeds whenever possible is recommended to protect one's sincerity.

True worship must be solely for Allah's pleasure, devoid of any desire for worldly recognition or praise from creation.