God created human beings with a powerful drive for love and a mutual attraction between men and women. This drive, when guided by sanctity, serves as the foundation of the marital covenant and for the closeness of husband and wife, about which the Torah says, “And he shall cling to his wife, so that they become one flesh” (Bereishit 2:24). This “clinging” begins with the mitzva of ona and culminates in the mitzva of procreation. By having children together, they unite literally in one flesh.
Since the attraction between men and women is the foundation of life and the strongest human drive, we have been commanded to enter into the covenant with God by removing the foreskin of the penis, the organ that joins man and woman. This is brit mila, the covenant of circumcision. With the removal of the foreskin, which symbolizes misdirected desire, the sacred covenant between God and Israel extends to the marriage covenant between husband and wife. When they engage in joyful lovemaking, the Shekhina dwells with them (Sota 17a), and their union leads to an abundance of love and blessing, benevolence and delight, life and peace, spreading throughout the world (see Berakhot 6b and Yevamot 62b).
In contrast, when this powerful impulse is corrupted, it damages the covenant. Instead of sanctifying it through the couple’s loving fulfillment of the mitzvot of ona and procreation, it is corrupted by adultery or self-gratification. This was the sin of the generation of the flood, of which the Torah says, “God saw how corrupt the earth was, for all flesh had corrupted its way on earth” (Bereishit 6:12). People continued to be drawn after their desires, committing the sins of adultery, idol worship, and theft, until the entire world was destroyed by the flood. The Sages explain that the punishment was quid pro quo: they sinned by corrupting the fiery passion that should have aroused their love in the context of marriage, using it for masturbation and adultery instead, so they were consumed by the boiling floodwaters (Sanhedrin 108a-b).
The sin of wasting seed – male masturbation – has an aspect of the sin of adultery, which is so grave that it is one of the Ten Commandments. On the verse, “You shall not commit adultery” (Shemot 20:13), the Sages comment: “There should be no adultery in you – not even your hand or foot”; in other words, a man must not masturbate with his hands or feet (Nidda 13b). Likewise, on the verse, “He shall cling to his wife, so that they become one flesh” (Bereishit 2:24), the Sages comment: “He shall cling to his wife and not someone else’s wife. He shall cling to his wife and not another man or an animal” (y. Kiddushin 1:1). R. Tzadok Ha-Kohen explains further that a man should not ejaculate anywhere other than with his wife (Tzidkat Ha-tzadik §121). This drive for life is meant to increase the love and devotion of a married couple. One who corrupts it in order to indulge his urges harms his ability to love his wife devotedly.
Masturbation is also antithetical to the mitzva of procreation. We know that it displeases God from the story in which Er and Onan wasted their seed to ensure that Tamar would not get pregnant. The Torah states, “But Er, Judah’s firstborn, was displeasing to the Lord, and the Lord took his life” (Bereishit 38:7), and shortly afterwards states about Onan, “What he did was displeasing to the Lord, and He took his life also” (ibid. v. 10). Therefore, coitus interruptus is forbidden. Even if a man does so when his wife cannot conceive in any case, such as when she is pregnant, nursing, or menopausal, he transgresses this prohibition (Yevamot 34b).
According to Tosafot (Sanhedrin 59b s.v “ve-ha”), the prohibition of wasting seed is an extension of the mitzva of procreation. Some say that the prohibition is derived from the biblical story of Er and Onan (Pri Megadim, Eshel Avraham 3:14; Ben Yehoyada, Nidda 13a). Others explain that the act is forbidden because of the prohibition of bal tashḥit (wasteful destruction) (R. Yaakov Ettlinger in Arukh La-ner, Nidda 13b and in Binyan Tziyon §137). Or Zaru’a 1:124 and Smak §292 include it in the prohibition of “Do not commit adultery,” based on the extrapolation of the Sages in Nidda 13b. Finally, Baḥ (3:6) sees the source of the prohibition in the verse, “Stay away from every evil thing” (Devarim 23:10), which the Sages explain to mean that “a man mustn’t entertain thoughts during the day that will cause him to become impure at night” (AZ 20b).
Aḥaronim are divided regarding the severity of the prohibition. Many say that it is biblical (R. Shneur Zalman Fradkin of Lublin, Torat Ḥesed, EH 43:1-2; Pri Megadim; R. Ḥayim Palachi, Ḥayim Ve-shalom, 2:18; Ezrat Kohen §32; Igrot Moshe, EH 3:14). Others maintain that it is rabbinic (Responsa Pnei Yehoshua 2:44; Meshivat Nefesh §18; Ezer Mi-kodesh 23:2; R. Shlomo Kluger, Mei Nidda, Kuntres Aḥaron 195:7; Torot Emet, EH 23). It seems that even according to those poskim who believe that the transgression is only rabbinic, its basis is from the Torah, because it is contrary to the Torah’s goals in the mitzvot of ona and procreation. For a more extensive discussion of this topic, see R. Tzadok Ha-Kohen of Lublin, Takanat Ha-shavin §15.