Haya’ and how to attain it
Question

What is the difference between khajal (shyness) and haya’ (modesty)? How can a person rid himself of khajal and how can he attain haya’?
Praise be to Allah.Firstly:
Khajal (shyness) is haya’ (modesty), as indicated in the Arabic dictionary al-Mu‘jam al-Waseet (p. 219).
The word khajal may also refer to confusion or hesitation that may affect one who has haya’.
See: Lisaan al-‘Arab (2/1106).
Secondly:
Haya’ is an attitude which motivates a person to do what is good and to keep away from what is reprehensible and bad.
Al-Aadaab ash-Shar‘iyyah by Ibn Muflih (2/219).
An-Nawawi said in Riyadh as-Saaliheen (p. 295): The scholars said: The definition of haya’ is a characteristic that prompts a person to refrain from what is reprehensible and bad, and prevents him from falling short in fulfilling the rights of others who have rights over him. End quote.
There are many hadiths which speak of the virtue of attaining the characteristic of haya’.
Al-Bukhaari (6117) and Muslim (165) narrated from ‘Imraan ibn Husayn that the Prophet (blessings and peace of Allah be upon him) said: “Haya’ leads to nothing but good.”
According to a version narrated by Muslim (166): “Haya’ is all good.”
Al-Haakim narrated from Ibn ‘Umar (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) said: “Haya’ and faith are inseparable; if one of them is lost, the other will be lost too.” Classed as saheeh by al-Albaani in Saheeh al-Jaami‘ (2483).
Thirdly:
Haya’ is of different types, for each of which there is a means by which a person may attain it.
1.. Haya’ (shyness) before Allah
A person may attain this type of haya’ by several means, including the following:

By reflecting on the blessings that Allah has bestowed upon him, and how many they are. He should reflect on how he is falling short in showing appropriate gratitude, and as a result of that, will feel shy before Him.
By reflecting on the greatness of Allah, may He be exalted, and His perfect dominion and power. Then he will feel too shy to disobey Him or go against His command, and he will feel shy because he is not worshipping Allah, may He be exalted, properly as is His due.
By remembering that Allah, may He be exalted, is watching him and knows what he conceals and hides. So he should feel too shy to let Allah, may He be exalted, see him in a place where He has forbidden him to be.

2.. Shyness before the angels, especially the noble scribes, lest they see him doing something reprehensible that Allah, may He be glorified and exalted, has forbidden him to do, or they record him saying a word that will make him sad on the Day of Resurrection, and so on.
A person may attain this type of haya’ by calling to mind the fact that the angels are constantly with him and never leave, and they see whatever he does.
3.. Shyness before people, whereby a person feels too shy to fall short in his duties towards them, or to appear before them or become well known for doing something reprehensible.
4.. Shyness before oneself, meaning that a person feels too shy before himself to be content with falling short and being at a low level. Therefore he strives constantly to elevate himself and aspires to a higher level, and if he causes himself to fall to a lower level, he feels shy before himself.
Fourthly:
Some people may confuse haya’ with weakness and a lack of self-respect, so if they see an evil, they feel too shy to denounce it, or if they see people failing to do some righteous deed, they feel too shy to enjoin it, or if they know a Sunnah, they feel too shy to adhere to it!
In fact this is not haya’; rather it is weakness and a lack of self-respect. Haya’ inspires a person to do good deeds and keep away from what is bad and reprehensible – as noted above – so if a person fails to enjoin what is right and forbid what is wrong, this has nothing to do with haya’.
If a person fails to do what is recommended by Islamic teachings, this is not haya’.
An-Nawawi (may Allah have mercy on him) said in Sharh Saheeh Muslim (1/112):
With regard to haya’ being all good and leading to nothing but good, that may confuse people, because the one who is shy and modest (haya’) may not be able to confront with the truth one whom he holds in high esteem, so he will fail to enjoin what is right and forbid what is wrong in this case. Shyness may make him fail to pay proper attention to some of his duties, and may lead to other shortcomings that are usually known in such cases.
The response to that is what was suggested by a number of leading scholars, including Shaykh Abu ‘Amr ibn as-Salaah (may Allah have mercy on him), who noted that what prevents a person from doing what is required of him is not true haya’; rather it is helplessness, weakness and a lack of self-respect. In fact haya’ is a word that people customarily apply to such behaviour, and they do that because it resembles true haya’.
True haya’, however, is a characteristic that prompts a person to refrain from what is bad and reprehensible, and prevents him from falling short in doing his duty towards all those who have rights over him, and so on. End quote.
Discussing haya’ in detail would take too long. Whoever would like to know more may refer to Madaarij as-Saalikeen by Ibn al-Qayyim (may Allah have mercy on him) (2/267-269).
And Allah knows best.