Praise be to Allah.
The scholars are unanimously agreed that it is permissible to trim or cut the moustache, because of the many ahaadeeth that have been narrated concerning that, such as the words of the Prophet (peace and blessings of Allaah be upon him): “Let the beard grow, and trim the moustache.” Narrated by al-Bukhaari (5442). And he (peace and blessings of Allaah be upon him) said: “Whoever does not remove anything from the moustache is not one of us.” Narrated by al-Tirmidhi (2685) and classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
Al-Nawawi (may Allaah have mercy on him) said in al-Majmoo’ (1/340)” As for cutting the moustache, there is unanimous agreement that it is Sunnah. End quote.
But there is a difference of opinion among the scholars as to how much may be removed.
Al-Shawkaani said in Nayl al-Awtaar (1/148): The people differed as to the amount that may be cut from the moustache. Many of the salaf were of the view that it may be removed completely and shaved off, because of the apparent meaning of the words shave and remove completely. This was the view of the Kufis [and is one view narrated from Imam Ahmad. What is meant by the Kufis is the followers of Abu Haneefah (may Allaah have mercy on him)].
Many others were of the view that it is not allowed to shave it or remove it completely. This was the view of Maalik [and of al-Shaafa’i and of Ahmad, according to another report from him].
Imam Maalik was very strict about shaving the moustache and regarded it as mutilation for which a person deserved to be disciplined. He said that shaving it was a bid’ah (innovation) which had appeared among the people. This was narrated from him by al-Nawawi in al-Majmoo’ and by Ibn al-Qayyim in Zaad al-Ma’aad and others, but the majority of scholars were of a different view, as they thought that there was nothing wrong with shaving or cutting it, although they differed as to which is better. End quote.
Al-Mardaawi said in al-Insaaf (1/121): He may shave his moustache or trim the ends, but shaving is better. This was stated by him [i.e., Imam Ahmad]. End quote.
Ibn al-Qayyim stated in Zaad al-Ma’aad (1/171) that Imam Ahmad (may Allaah have mercy on him) said: If he shaves it there is nothing wrong with it, and if he cuts it there is nothing wrong with it. The evidence that Imam Ahmad quoted for that is that the ahaadeeth enjoined shaving and cutting.
Hence the brother who asked this question may know that there is nothing wrong with what he is doing, although it is better to cut the moustache so that the edge of the lip appears, and not to remove it altogether, because this is what the Messenger (peace and blessings of Allaah be upon him) used to do. It was narrated that Ibn ‘Abbaas (may Allaah be pleased with him) said: The Prophet (peace and blessings of Allaah be upon him) used to cut his moustache. Narrated by Ahmad (2733). Shaykh Ahmad Shaakir said: Its isnaad is saheeh.