UJUB (VANITY or NARCISSISM) from Islamic perspective

(From 'Shariah and Tariqah' based on Maulana Ashraf Ali Thanwi's teachings)

Allah Ta'ala says:

"(Remember the time) when your great number pleased you (instilling vanity in you)."

Rasulullah sallallahu alayhi wasallam said:

"And the destroyers are: desires which are followed; stinginess which is obeyed; and a man being pleased with himself and this (last trait) is the worse of them (of the things which spiritually wrought destruction to one)." -Reported by Imam Bayhaqi

What is Ujub?
Ujub is to attribute one's excellence to oneself while being oblivious of the possibility of such excellence being snatched away by Allah Ta'ala. Ujub is a concealed and subtle trick of the nafs which always desires to occupy a distinguished rank (above others). The nafs obtains pleasure in this desire (of ujub). Allah Ta'ala detests one who considers himself to be distinguished, laudable and the receptacle of excellence.

Delight over the bounties granted by Allah Ta'ala is not ujub. Such true delight is not unrestricted and does not produce vanity since the fear of the elimination of the bounties is ever present in the heart. One realizes that the excellence or bounty which one has gained is purely a gift from Allah Ta'ala Who has awarded it because of some act or knowledge (which is also the favour of Allah), and one further realizes that Allah Ta'ala has the full power of snatching away the bounty at any time He desires. This experience of delight is therefore not ujub.
On the other hand, a person suffering from the ailment of ujub becomes neglectful and fails to recognize
that the bounty in his possession is in fact a gift from Allah Ta'ala. One afflicted with ujub considers himself to be entitled to the bounties.

Ujub resembles takabbur (pride) in all aspects, save one, viz., ujub does not necessarily imply others to be one's inferiors. A person involved in the disease of ujub considers himself to be of a lofty rank without necessarily regarding another to be his inferior. According to the Hadith Shareef the man of ujub strutting about in arrogance will meet Allah Ta'ala on the Day of Qiyaamah in the state of severe wrath.

THE REMEDY

Always regard excellence and virtues which one possesses to be the bestowal of Allah Ta'ala. Contemplate on the power of Allah and fear the possibility of the gifts being snatched away. Ponder about your faults, both internal and external so that the notion of perfection and holiness is annihilated.