Negative commandment · Lo Ta’aseh #14 of 613
To not swear by idolatry
שלא לישבע בעבודה זרה לעובדיה, ולא משביעין אותן בה
The verse · Shemot 23:13
וּבְכֹל אֲשֶׁר־אָמַרְתִּי אֲלֵיכֶם תִּשָּׁמֵרוּ וְשֵׁם אֱלֹהִים אֲחֵרִים לֹא תַזְכִּירוּ לֹא יִשָּׁמַע עַל־פִּיךָ
“And all things that I have said to you be mindful of: and make no mention of the name of other gods, neither let it be heard out of thy mouth.”
The Rambam’s words
Not to take an oath on a false god [as requested by] one of its worshipers, nor to have one of them take an oath on [their false god], as [Exodus 23:13] states: "And the name of other gods you shall not mention, nor should it be heard from your mouth."
שלא לישבע בעבודה זרה לעובדיה, ולא משביעין אותן בה, שנאמר "ושם אלוהים אחרים לא תזכירו, לא יישמע על פיך" (שמות כג,יג).
Why · Sefer HaChinuch #86
To not swear by idolatry
“It is from the roots of the commandment to distance any matter of idolatry — whether in deed or in speech — to the point that its memory not rise up in our hearts ever.”
Who & when
“And [it] is practiced in every place and at all times by males and by females.”
Where in the Mishneh Torah
Hilchot Foreign Worship and Customs of the Nations הלכות עבודה זרה וחוקות הגויים