Short answer
Yes. In the Hanafi school, shaving the beard or trimming it shorter than a fist is makruh tahrimi (close to haram), and doing it habitually is a major sin. There is no worldly punishment fixed for it: it is a sin to repent from. The Maliki and Hanbali schools also call it haram; the relied-upon Shafi'i view calls it strongly disliked.
Growing the beard to one fist (qabdah) is wajib. Shaving it, or trimming it below a fist, is makruh tahrimi, and a man who persists in it is counted as fasiq (openly sinful), so appointing him as a regular imam is makruh tahrimi.
Other madhhabs
- Shafi'i
- The relied-upon view of al-Rafi'i and al-Nawawi is that shaving the beard is makruh, though many Shafi'i scholars held it to be haram.
Explanation
The Prophet ﷺ gave a direct command about the beard more than once: let it grow, trim the moustache, and differ from the idolaters. The Hanafi scholars read a repeated command like this as making the beard wajib (obligatory), and they note that no Companion is known to have shaved. That is why the Hanafi books say no one in the school permitted cutting it below a fist.
So these all fall under the same ruling: a clean shave, keeping only stubble, and a short boxed beard that never reaches a fist. Trimming what grows beyond a fist is a different matter and is allowed. The details of length are in the Sunnah length of the beard.
As for punishment, there is no fixed worldly penalty (hadd) and no fine. It is a sin between you and Allah. It does not take anyone out of Islam, and your prayers and fasts remain valid. A man who shaves should not mock the beard or call it unimportant, since belittling a Sunnah is far worse than falling short of it. The way out is simple: sincere repentance and letting the beard grow.
People often ask about work. Many employers in the US, UK and the Gulf accept beards on religious grounds, so ask for an accommodation before assuming you must shave. If a real medical condition or a genuine safety rule seems to force you, explain your case to a mufti rather than deciding alone.
For the reasons behind the beard and its history, see why Muslim men have beards.
The evidence
Quran, Surah Al-Hashr 59:7
مَّآ أَفَآءَ ٱللَّهُ عَلَىٰ رَسُولِهِۦ مِنْ أَهْلِ ٱلْقُرَىٰ فَلِلَّهِ وَلِلرَّسُولِ وَلِذِى ٱلْقُرْبَىٰ وَٱلْيَتَٰمَىٰ وَٱلْمَسَٰكِينِ وَٱبْنِ ٱلسَّبِيلِ كَىْ لَا يَكُونَ دُولَةًۢ بَيْنَ ٱلْأَغْنِيَآءِ مِنكُمْ ۚ وَمَآ ءَاتَىٰكُمُ ٱلرَّسُولُ فَخُذُوهُ وَمَا نَهَىٰكُمْ عَنْهُ فَٱنتَهُوا۟ ۚ وَٱتَّقُوا۟ ٱللَّهَ ۖ إِنَّ ٱللَّهَ شَدِيدُ ٱلْعِقَابِ ﴿٧﴾
And what Allah restored to His Messenger from the people of the towns - it is for Allah and for the Messenger and for [his] near relatives and orphans and the [stranded] traveler - so that it will not be a perpetual distribution among the rich from among you. And whatever the Messenger has given you - take; and what he has forbidden you - refrain from. And fear Allah; indeed, Allah is severe in penalty.
Whatever the Messenger commands is to be followed, which includes his command about the beard.
Sahih al-Bukhari 5892
Sahih... خالفوا المشركين وفروا اللحى وأحفوا الشوارب ...
"Be different from the idolaters: let the beard grow fully and trim the moustache short."
A direct command to grow the beard, which the Hanafis treat as wajib.
Sahih Muslim 260
Sahih... جزوا الشوارب وأرخوا اللحى خالفوا المجوس ...
"Clip the moustaches, let the beards hang down, and be different from the Magians."
The same command repeated in another wording and by another Companion.
Where the ruling is recorded
- al-Durr al-Mukhtar with Radd al-Muhtar, Kitab al-Sawm, chapter on what does and does not break the fast. States that taking from the beard below a fist was permitted by no one.
- al-Fatawa al-Hindiyya, Kitab al-Karahiyya, chapter on circumcision, hair and nails. On the beard, the moustache and what may be trimmed.
- al-Majmu' (Nawawi), Kitab al-Taharah, chapter on the siwak and the practices of the fitrah. Nawawi's discussion of the beard and the Shafi'i view that shaving is makruh.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.