Although the prohibition against ḥametz applies primarily during the seven days of Ḥag Ha-matzot (from the 15th through the 21st of Nisan), we are nevertheless commanded to remove ḥametz from our homes by midday of the 14th of Nisan, Erev Pesaḥ.
The prohibition against eating ḥametz also begins at midday on the 14th, as it is written, “And you shall sacrifice the Pesaḥ [offering] to God…you shall not eat ḥametz with it” (Devarim 16:2-3). This prohibits the eating of ḥametz from the time fit for bringing the Pesaḥ sacrifice, i.e., at midday on the 14th of Nisan. This prohibition against eating ḥametz includes the prohibition against deriving any benefit from it.
In order to distance one further from possibly violating commandments, the Sages added to the prohibitions and forbade gaining benefit from ḥametz for an additional hour. They also forbade eating ḥametz for two extra hours, since on a cloudy day (and where there are no clocks) people are likely to err by as much as two hours.
These times are calculated by dividing the day into twelve equal parts, each of which is called “a seasonal hour” (“sha’ah zemanit”). Thus, one may eat ḥametz for the first four seasonal hours of the 14th. During the fifth hour it is rabbinically forbidden to eat ḥametz, but it is permissible to derive benefit from it by, for example, feeding it to an animal or selling it to a gentile. With the onset of the sixth hour of the day, it becomes forbidden rabbinically to derive benefit from ḥametz, and if one forgot to sell it to a gentile by then, it must be destroyed. When midday arrives, that is, after the sixth hour ends, ḥametz is forbidden by Torah law both for consumption and for deriving any benefit, and one must dispose of it as soon as possible. Every moment that one does not get rid of it, he violates the positive commandment to eliminate ḥametz (see below, 3:6).
Once the holiday begins, two additional prohibitions apply: bal yera’eh and bal yimatzei. The prohibition against eating ḥametz also becomes more severe: one who willfully eats ḥametz after midday on the 14th is punishable by lashes only, whereas one who willfully eats ḥametz after the holiday begins is punishable by karet. This is based on the verse: “whoever eats ḥametz, from the first day until the seventh day, that soul shall be cut off from Israel” (Shemot 12:15).
Ḥametz becomes permissible once again after Pesaḥ, except that our Sages forbade ḥametz that belonged to a Jew during the holiday (“ḥametz she-avar alav ha-Pesaḥ”). Since by keeping the ḥametz on Pesaḥ he violated the prohibitions of bal yera’eh and bal yimatzei, the Sages prohibited eating or gaining benefit from that ḥametz even after Pesaḥ. Ḥametz that was in the possession of a gentile during Pesaḥ, however, is permissible; a Jew may buy it and eat it (SA 448:1-3).
The prohibition against eating ḥametz and obtaining any benefit from it applies from midday on the 14th according to R. Yehuda, as explained in Pesaḥim 28a. Rambam, as well as R. Yitzḥak ibn Gi’at, Rosh, and most Rishonim, ruled in accordance with this view. R. Shimon’s view is that the prohibition against eating ḥametz begins with the holiday itself, and it is only the mitzva of removing the ḥametz that comes into effect at midday on the 14th. Some Rishonim rule in accordance with this view, although they disagreed about what the mitzva of eliminating ḥametz entails according to R. Shimon. According to Ramban and Raavad, since one is obligated to eliminate the ḥametz, it is also forbidden to eat it; yet Torah law permits him to benefit from it in the course of its being burned. Only the Sages prohibited deriving any benefit from the ḥametz from the beginning of the sixth hour of the day. According to Ha-ma’or, the mitzva of disposing of the ḥametz does not imply a prohibition against eating it, since by eating it, one is, in fact, disposing of it. As noted, the view of most poskim is that the halakha follows R. Yehuda’s view that the prohibition against eating ḥametz and the prohibition against deriving any benefit from ḥametz are of Torah origin and apply from midday. This is how the halakha is decided in SA (443:1).
According to R. Yehuda, ḥametz she-avar alav ha-Pesaḥ is forbidden by the Torah, whereas according to R. Shimon, the Torah permits it, but the Sages decreed it to be forbidden (Pesaḥim 28b-29a). The halakha follows the latter view (MT, Laws of Ḥametz and Matza 1:4; MB 448:7).
. This is because, with respect to these prohibitions, the Torah states “seven days” explicitly (Raavad, Maharam of Rothenburg, MA, MB 443:1. Others say that the prohibition starts on midday of the 14th (Rashi, and this is also implied by Rabbeinu Ḥananel and Itur, SHT 443:2).