442. Going Against the Grain: The prohibition against eating second tithe grain outside Jerusalem
In your cities you may not eat the tithe from your grain… (Deuteronomy 12:17)
In Mitzvah #473, we will fully discuss maaser sheini, the second tithe. Maaser sheini is taken after maaser rishon (the first tithe, hence the name) and it is only taken in four years of the seven-year Shemittah cycle. Unlike most tithes, which were to be given to a Levite (or, in one case, to the poor), maaser sheini was to be taken to Jerusalem, where it would be eaten by the owner and his family. Our mitzvah here specifies that second tithe of one's grain was not to be eaten outside of Jerusalem.
The reason for this mitzvah is what was said in Mitzvah #360, back in parshas Bechukosai, that Jerusalem is the spiritual heart of the nation. God therefore gave us many reasons to go there. The three annual pilgrimages, maaser beheima (the animal tithe) and maaser sheini are all mitzvos designed to encourage the people to take advantage of all Jerusalem has to offer.
This mitzvah only applies at a time when the maaser sheini is in effect. It is the topic of tractate Maaser Sheini in the Mishna; it is discussed in the Talmud in tractate Makkos (17a) and in Kerisos (5a). It is codified in the Mishneh Torah in the second chapter of Hilchos Maaser Sheini. This mitzvah is #141 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.