Is it permissible to swear by religion, such as if the one who is swearing an oath says: “By my religion”?
Question

I see some people, when they swear oaths, saying, “By my religion, I shall do such and such.” What is the ruling on their swearing by religion? Does it come under the heading of swearing by something other than Allah, may He be glorified and exalted?
Praise be to Allah.It is not permissible to swear an oath except by Allah or by one of His names or attributes. Whoever swears an oath by anything other than that is sinning; in fact swearing by anything other than Allah comes under the heading of shirk. Abu Dawud (3251) narrated from Ibn `Umar (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) said: “Whoever swears by something other than Allah has committed an act of shirk.” Classed as sahih by al-Albani in Sunan Abi Dawud.
Abu Dawud (3248) also narrated that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Do not swear by your fathers or by your mothers or by the rivals (to Allah). Do not swear by anyone but Allah, and do not swear by Allah unless you are telling the truth.” Classed as sahih by al-Albani in Sahih Abi Dawud.
Swearing by religion comes under the heading of swearing by something other than Allah, may He be exalted. So when the one who swears an oath says, “By my religion,” he is including his actions such as prayer, fasting, Hajj and all other acts of worship, and swearing by them is swearing by something other than Allah.
Al-Kasani (may Allah have mercy on him) said:
If he says “Bi hudud Allah,” that is not an oath, and the scholars differed as to what is meant by “Bi hudud Allah.” Some of them said that it refers to the well-known hadd punishments (hudud), such as the hadd punishments for zina, theft, drinking alcohol and slandering chaste women.
One of the scholars said: What is meant is the obligatory duties, such as fasting, prayer and so on. All of that is swearing by something other than Allah, may He be exalted, so it is not an oath.
End quote from Bada’i` as-Sana’i`, 7/22.
It says in Tabyin al-Haqa’iq, 3/109:
Swearing by obedience is not an oath, because it is swearing by something other than Allah, may He be exalted. End quote.
Shaykh Ibn Baz (may Allah have mercy on him) said:
It is not permissible to swear by prayer or dhimmah (one’s honesty) or any other created thing. One can only swear by Allah alone, so he should not say: “Bi dhimmati (By my honesty) I did not do such and such,” or “Bi dhimmat (By the honesty of So-and-so,” or “By the life of So-and-so,” or “By my prayer.” And I should not ask him to swear by such things, by saying, “Say: ‘By my honesty,’ or ‘By my prayer,’ or ‘By my zakah.’” There is no basis for any of that, because prayer is an action of people and zakah is an action of people, and people’s actions are not a thing to be sworn by. Rather we can only swear by Allah, may He be Glorified and Exalted, alone, or by His attributes.
End quote from Fatawa Ibn Baz, 9/345.
For more information, please see the answer to question no. 141164.
And Allah knows best.