In parshas Ki Seitzei (Deuteronomy chapter 21), we read of the ben sorer u’moreh, the “stubborn and rebellious son,” who is punished for, among other things, his gluttonous ways. We have a problem however: the Torah never imposes a punishment for something unless it had somewhere warned us not to do that thing! So where did the Torah forbid such gluttony? According to the Talmud in Sanhedrin (63a), “Do not eat on the blood” means, “do not eat the meal that will lead to bloodshed,” namely the meal of the ben sorer u’moreh. So, while the Torah doesn’t discuss the details of that mitzvah until much later, the mitzvah is actually counted here.
This mitzvah is actually a “lav she’bichlalos,” a negative commandment that prohibits several completely different things. (See The Rambam’s Ninth Principle in Taryag.) A lav she’bichlalos is normally not punishable but it is here since the Torah explicity mentions the punishment of a ben sorer u’moreh.
Among the other things that the Talmud in Sanhedrin reads into this verse are the prohibition against eating from a slaughtered animal before it dies, the prohibition against eating from a sacrifice before the blood is sprinkled on the altar, and that the Sanhedrin fasts on a day they must perform an execution. All of these and more are legitimately derived from a single verse!
The basis of this mitzvah is that gluttony leads to a multitude of sins. The Sefer HaChinuch refers us to Deuteronomy 32:15, which tells us that Jeshurun (that is, Israel) “grew fat and rebelled.” When a person is overstuffed and complacent, he’s more inclined to turn his back on God. Therefore, while we are meant to enjoy our food and drink, we shouldn’t act as if we’ve never seen food before and gorge ourselves like animals. Rather, we should eat only until we are satisfied, which is the manner of the righteous (as per Proverbs 13:25).
While no one should be a glutton, the ben sorer u’moreh is specifically a 13-year-old male. The law of the ben sorer u’moreh only applies in Israel at a time when there is a Sanhedrin judging capital cases. This mitzvah is discussed in the Talmudic tractate of Sanhedrin on page 68b-71b and is codified in the Mishneh Torah in the seventh chapter of Hilchos Mamrim. It is #195 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos and #106 of the 194 negative mitzvos that can be observed today in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.