Shaikh Ahmad al-Nafarawi al-Maliki said in the commentary of Imam Abu Zaid’s Risala, “To shave the beard is without doubt haram according to all Imams”, it is also mentioned in ‘Tamhid’ which is a commentary of the Muwatta’ of Imam Malik that to shave the beard is haram and among males the only ones to resort to this (practice) are the hermaphrodites. (From the book “at-Tamhid”)
Yahya related to me from Malik from Yahya ibn Sa’id that Sa’id ibn al-Musayyub said, “Ibrahim, may Allah bless him and grant him peace, was the first to give hospitality to the guest and the first person to be circumcised and the first person to trim the mustache and the first person to see grey hair. He said, ‘O Lord! What is this?’ Allah the Blessed, the Exalted, said, ‘It is dignity, Ibrahim.’ He said, ‘Lord, increase me in dignity!’” (Imam Malik’s Muwatta Book 49, Hadith # 49.3.4)
Yahya said that he had heard Malik say, “One takes from the mustache until the edge of the lip appears, that is the rim. One does not cut if off completely so that one mutilates oneself.” And this is why one should not shave the mustache as Imam Malik was asked about the person who completely shaves his mustache, he said that he sees that he should be beaten up, he also said that this is an innovation that appeared among the people. [Narrated by al-Baihaqi, also mentioned in Fath al-Bari, 10/347].