2,709. An Oath to Perform a Mitzvah

Hilchos Shevuos 11:2

It is prohibited to take an oath on anything else using God’s name. One who associates another matter with God’s name in an oath will be uprooted from the world because no one is worthy to do so except for God Himself.

Hilchos Shevuos 11:3

One is permitted to take an oath to perform a mitzvah in order to give himself zeal. Even though he is already obligated in the mitzvah, this is permitted as per Psalms 119:106, “I took an oath and I will uphold it, to observe Your righteous judgments.”