This mitzvah is potentially troubling. It didn’t bother the Rambam and it didn’t bother the Sefer HaChinuch, but it might bother some of us a great deal. It need not.
Let’s start with what the Rambam says in his Sefer HaMitzvos. “The 177th (negative) mitzvah is the warning against eating creeping things that breed from decay, even though they are not of a distinct species and they are not bred from a male and a female.” This kind of supports the discredited theory of spontaneous generation.
The Sefer HaChinuch quotes the Rambam without question, which is hardly surprising, since he lived in the 13th century. More surprising is that the Chofetz Chaim also uses this language in his Sefer HaMitzvos HaKatzar, which was published in 1931.
So what’s going on?
It would be easy to say that the Rambam simply got this one wrong but there are two problems with this approach: (1) That would leave us with 612 mitzvos in his count and (2) it would be incredibly arrogant for us to second-guess the Rambam! (He wrote the Mishneh Torah, Peirush HaMishnayos AND Moreh Nevuchim. When anyone reading this can write any one of those things, then we can talk about the possibility of second-guessing the Rambam.)
So how are we to understand this mitzvah when it so blatantly flies in the face of our understanding of nature? It may be an oversimplification of the issue but for our purposes it is safe to say that the “what” is correct, even if the “why” is in error.
This is not an unprecedented approach. The Talmud states that lice may be killed on Shabbos because they spontaneously generate (Talmud Shabbos 107b). Rav Eliyahu Dessler, author of Michtav M’Eliyahu, addressed this issue. He said that the reasons attached to the halacha are only speculative; in this case, the Sages assumed that the reason lice may be killed is because they spontaneously generate but if the reason is disproved, the halacha is unaffected. (Indeed, the Talmud Yerushalmi also permits lice to be killed on Shabbos but it never suggests the reason of spontaneous generation! See Yerushalmi Shabbos 1:3.) Rav Moshe Feinstein also ruled that a change in nature (or a change in our understanding of nature) does not affect halacha (see Igros Moshe CM 2:73). (This is just one approach to dealing with such questions; a full analysis is beyond our scope.)
Nevertheless, we are left to explain this mitzvah, namely not to eat a creeping thing that moves on the earth.
Spontaneous generation or not, the Torah draws a distinction between “creeping things that crawl on the ground“ (verse 41, Mitzvah 162) and “creeping things that move on the earth” (our verse and this mitzvah). Both are prohibited, regardless of the scientific realities of their parentage. It’s entirely possible that the distinction between these two categories is the visibility of the creature’s eggs. As we mentioned in the previous mitzvah, things that cannot be seen with the naked eye are generally not problematic. This verse may prohibit visible insects whose eggs cannot be seen. For 3,156 years – from the giving of the Torah in the Hebrew year 2448 until the proof of Louis Pasteur in 1864 CE – it would have been reasonable for people to assume that such creatures were spontaneously generated.
In any event, the Torah itself never mentions spontaneous generation. In fact, in the aforementioned Talmud Shabbos 107b, the sage Abaye states outright that lice do not spontaneously generate, citing a dictum that specifically refers to lice eggs. That position is dismissed on the assumption that it must refer to some other species of insect but you can see that this was never a one-sided issue. Spontaneous generation is not and never was a tenet of our faith.
This mitzvah applies to both men and women in all times and places. It is discussed in the Talmud in tractate Makkos on page 16b. It is codified in the Shulchan Aruch in Yoreh Deah 84. It is #177 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos and #100 of the 194 negative mitzvos that can be fulfilled today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.