The core principle that one engaged in a mitzvah is exempt from another mitzvah is anchored in the mishnah and Gemara of Sukkah 25a, which exempts שלוחי מצוה (those on the path to perform a mitzvah) from sukkah, deriving the broader rule from the case of those occupied with Yosef's bier who could not bring the Pesach offering, and from the pasuk excluding one engaged in a mitzvah from the obligation of Shema, as also discussed in Berakhot 11a. Rashi (Sukkah 25a) and Tosafot (Sukkah 25a) sharpen this, with Tosafot questioning why one cannot simply fulfill both mitzvot at once, a tension that echoes throughout the later sources.
The Rambam codifies this principle in two places: in Mishneh Torah, Marriage 15:2 he permits a Torah scholar to delay marriage because one engaged in Torah study is exempt from another mitzvah, and in Mishneh Torah, Shofar, Sukkah and Lulav 6:4 he applies the exemption to שלוחי מצוה and travelers regarding sukkah. He similarly exempts kohanim, leviim and yisraelim engaged in the Temple service from tefillin and tefillah in Mishneh Torah, Tefillin, Mezuzah and the Torah Scroll 4:13.
The Shulchan Arukh and its commentators extend the principle to practical areas of daily life: Shulchan Arukh, Orach Chayim 70:4-5 discusses one occupied with communal needs when the time for Shema arrives, Shulchan Arukh, Orach Chayim 38:8 exempts scribes of tefillin and mezuzot and their dealers from wearing tefillin while working, and Shulchan Arukh, Orach Chayim 93:4 treats one engaged in communal affairs as equivalent to one engaged in Torah study. The Mishnah Berurah 70:16-18 and Mishnah Berurah 38:24 refine these rulings, limiting the exemption to cases where fulfilling the other mitzvah would require real exertion, and Mishnah Berurah 640:7 applies the same logic to attendants of those traveling for a mitzvah. The Levush, Orach Chayim 70:4 likewise frames one occupied with communal needs as exempt from Shema but urges he at least recite the first pasuk, and the Shulchan Arukh HaRav, Orach Chayim 38:7 similarly exempts those engaged in sacred labor from tefillin specifically while so occupied.
Sukkah-specific applications of the principle appear in Shulchan Arukh, Orach Chayim 640:3-4, which exempts the ill and the distressed from sukkah, and in Shulchan Arukh HaRav, Orach Chayim 640:7, which clarifies that the exemption for the distressed applies only to the person himself, not to his attendants, who remain obligated. Peninei Halakhah, Sukkot 3:13 applies this to a modern case, ruling that one who leaves home to accompany a hospitalized patient is exempt from sukkah because the trouble of seeking one out would impair the mitzvah he is already engaged in, though if a comfortable sukkah is available without burden he should use it.
Other Talmudic sugyot test the boundaries of the exemption: Berakhot 17b exempts pallbearers from tefillah when their involvement is genuinely needed, Moed Katan 14b explains that communal rejoicing on a festival overrides an individual's preexisting mourning obligations, and Sukkah 25b discusses those occupied with a mitzvah-burial whose seventh day of impurity fell on the eve of Pesach. Berakhot 20b addresses a related but distinct exemption, that of women from time-bound positive mitzvot, and Rashi on Sukkah 26a:1 notes that not all tannaim accept the principle that one engaged in a mitzvah is exempt from another, as seen in the dispute over a groom's exemption from Shema.
Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim 70:5 records a dispute among later authorities whether fundraisers for Torah institutions today retain the exemption from tefillah and Shema that earlier generations had, since the earlier exemption applied specifically when communal work was done purely for the sake of Heaven, and some say one should nonetheless strive not to exempt himself from tefillah.
The Hasidic sources extend the concept beyond halachic exemption into broader values: Tanya, Part I; Likkutei Amarim 37:26-27 teaches that one interrupts Torah study to perform an active mitzvah that cannot be done by others, since deed is the essential purpose of creation, while Likkutei Sichos 6 ויקהל 2 explains that Moshe himself was forbidden to physically build the Mishkan because his essence was Torah, which is superior to labor even of a mitzvah nature.
Revavos Ephraim (Revavos Ephraim 7:382) rules that one may set sail on a business voyage before Shabbat, even knowing this will certainly prevent Shabbat enjoyment, because the voyage is considered a davar mitzvah, applying the principle that one engaged in a mitzvah is exempt from another mitzvah.
Tzitz Eliezer (Tzitz Eliezer 19:12) affirms the principle in general but rejects extending it to ordinary merchants, declining to treat commercial activity as mitzvah-engagement that would exempt them from other mitzvot, citing the practice of the people of Beit She'an who refrained from traveling from Tyre to Sidon on Friday.
Minchas Yitzchak (Minchas Yitzchak 10:86) addresses whether a paid charity collector or fundraiser counts as one engaged in a mitzvah, distinguishing routine collection of predetermined obligations from active fundraising that persuades donors to give to Torah institutions, and concludes that the latter may properly be considered oseik be-mitzvah despite receiving compensation.
Further applications and refinements appear among the modern responsa: Rav Ephraim Greenblatt (Revavos Ephraim 5:133) limits the principle to cases where the competing obligation is a genuinely different mitzvah, holding that obligations within the same category, such as components of tefillah, remain binding, applying this to interruptions during Shema and the Amidah; Tzitz Eliezer (Tzitz Eliezer 11:3) rules that one engaged in a mitzvah need not interrupt to respond to another mitzvah though he may do so voluntarily; and Avnei Yashfeh (Avnei Yashfeh 4:101) and Avnei Yashfeh (Avnei Yashfeh 6:124) both apply the principle to situations of prayer and simultaneous obligations, the latter stressing the distinction between a mitzvah that can be performed by others and one that cannot.