Translation:
Prophet Muhammad (PBUH) said, "There is no envy except in two cases: a man whom Allah has given wealth, and he spends it in the cause of truth; and a man whom Allah has given wisdom (knowledge), and he judges by it and teaches it to others."
Context:
This hadith is reported by Abdullah ibn Mas'ud (RA); it is recorded in Sahih al-Bukhari, Hadith 73, and Sahih Muslim, Hadith 816. As it is documented in both Sahih al-Bukhari and Sahih Muslim, it is regarded as Muttafaq ʿAlayh (Agreed Upon), which is the highest level of hadith authentication.
The Prophet (PBUH) taught his followers that there are only two types of "envy" (ghibṭah) that are deemed acceptable and praiseworthy. One type of acceptable envy is envying a person blessed with wealth by Allah, and he is spending it in Allah’s way by giving generously in charity, and the second type is desiring to be like a believer who is knowledgeable in Islam and teaches it to others.
Download