Shaving the beard is an alteration of Allah’s creation.
Allah, Exalted is He, says: “There is to be no alteration in Allah’s creation.” Exegetes have remarked that although phrased as a statement, it carries the sense of a directive: do not tamper with Allah’s creation or with the form upon which He originated you—namely, the recognition of Allah, His oneness, and the attendant traits of the fitrah.
He, Most High, also says, conveying Satan’s words: “I will command them, and they will surely alter Allah’s creation” (al-Nisaʾ 4:119).
This is an explicit proof that altering Allah’s creation without permission from the Sacred Law (1) is obedience to Satan and disobedience to the All-Merciful.
Perhaps the same idea is alluded to in His words: “and He fashioned you and perfected your forms …” (al-Taghabun 64:3).