Question: Is it permissible to swear by the Prophet Muhammad (peace be upon him)?
Answer: It is not permissible to swear by any creature, including the Prophet (peace be upon him), the Ka`bah, honesty, or anything else according to the majority of scholars. Rather, some scholars reported a consensus that this is prohibited. An odd view, however, is reported about the permissibility of swearing by the Prophet (peace be upon him), which is a groundless opinion. In fact, it is an invalid view that contradicts the preceding consensus of scholars and authentic Hadeeths mentioned on this issue. Among these Hadeeths is the one related by Al-Bukhaaree and Muslim on the authority of Ameer Al-Mu’mineen (Commander of the Believers), `Umar ibn Al-Khattaab (may Allaah be pleased with him), that the Prophet (peace be upon him) said: Verily! Allaah forbids you to swear by your fathers. If one has to take an oath, they should swear by Allaah or else keep silent. It is also related in the Two Saheeh Books of Hadeeth (i.e. Al-Bukhaaree and Muslim) on the authority of Aboo Hurayrah (may Allah be pleased with him) that the Prophet (peace be upon him) said: Whoever swears, saying (by error) in their oath ‘By Al-Laat and Al-`Uzzaa,’ they should say, ‘Laa ilaahaa illaa Allaah (there is no god but Allaah).’… read more here.