The first daf (page) of Masechet Megillah focuses on the distinction between open and walled cites, regarding the timing of the reading of the Megillah. While one might have argued that, almost by definition, whatever is outside of a walled city cannot be part of the city protected with a wall, the Gemara quotes the view of Rav Yehoshua ben Levi—without quoting a dissenting view—that "a walled city and all that is adjacent to it and that is seen with it is judged like a walled city" (Megillah 2b).
Apparently, just being near a walled city offers a degree of protection—presumably because one can get inside rather quickly, if need be. In determining the definition of "close", the Gemara quotes the view of "Rav Yirmiya, and some say Rav Chiya the son of Abba, as [the distance] from [the city of] Chamatan to Tiberias, [the distance of] a mil" (approximately one kilometre). The Gemara then abruptly changes topics with the teaching that "manzepach, the prophets said it".
The Hebrew alphabet contains 5 letters—mem, nun, tzadi, peh and chaf (whose first letters, joined together, spell manzepach)—whose font changes if it is the last letter of a word. It would appear the only link between this teaching and the previous one regarding those near a walled city is the author of the teaching, "Rav Yirmiya, and some say Rav Chiya the son of Abba". This is a common Talmudic technique that has much logic behind it, considering the "text" was originally an oral one that was to be memorized. But on closer examination, there appears to be much more than a mnemonic device linking these two teachings.
The Gemara immediately notes that it cannot be that the prophets instituted manzepach, as "a prophet is not allowed to institute a new thing from now". Rather, the Gemara explains that the font of the letters had been forgotten, and the prophets just reinstituted what had previously existed. This notion—that Torah is the domain of the Sages, not the prophets—is most famously demonstrated in the story of the "oven of Achnai", where the many signs from heaven brought by Rabbi Eliezer to support his view on the purity of the oven were nonetheless rejected (Bava Metzia 59b). "Torah is not in heaven" (Devarim 30:12) our Sages asserted, in rejecting any heavenly input into Jewish law.
It seems the operative word in our passage is "now". "Now", prophets have no authority in matters of Jewish law—but beforehand, it was different. It was during the time period of Purim that there was a fundamental change in the nature of Torah. It is at Purim, our Sages assert, that the Jewish people reaccepted the Torah—the Oral Law that had been forced upon them at Sinai (see Midrash Tanchuma, Parshat Noach, #3). Up until the destruction of the Temple, Torah was transmitted primarily through prophecy. Moshe—the greatest of the prophets—received the Torah from Sinai, and he passed it on to Yehoshua (another prophet), and Yehoshua to the elders[1], and the elders to the prophets, and they passed it to the Anshei Knesset Hagedolah, the Men of the Great Assembly (Avot 1:1). Yishayahu, Yirmiyahu, Eliyahu, and Micah were not only great prophets, they were the transmitters of Torah from one generation to the next (see the introduction of the Rambam to his Mishneh Torah). And during the First Temple period, G-d would communicate to the Jewish people through the Urim V'Tumim, the breastplate of the high priest[2].
But all that changed at the time of Purim. G-d moved behind the scenes—Esther is connected to hester, hidden—and prophecy ceased to exist. It was the Sages who would determine the law.
Rav Yirmiya, and some say Rav Chiya the son of Abba, connect the laws of the reading of the Megillah in a walled city with the transfer of Torah authority from the prophets to the Sages as it was precisely at Purim that this transition took place.
The image of the wall seems most appropriate. A walled city has clear, defined boundaries. This is the nature of the written Torah given by G-d—inflexible and limiting. However, the Oral Torah, which begins to develop with the passing of the Torah from the prophets to the Anshei Knesset Hagedolah--of which Mordechai was (a founding?) member—is expansive, fluid, and constantly charting new paths[3]. Yet the Oral Law flows from the written law, and is "adjacent to it and is seen with it". While it is open and expansive, "it is judged like a walled city". It is the link between the Written and the Oral Laws, between G-d and man, that is the key teaching of "Rav Yirmiya, and some say Rav Chiya the son of Abba".
[1] As the Tiferet Yisrael notes in his commentary to the Mishnah, prophecy ceased for a time after the death of Moshe Rabbeinu.
[2] While the legal teaching of the prophets may have been based more on their wisdom than on their prophecy, there is little doubt that until the time of Purim the word of G-d played a much more significant role in the development of Jewish law.
[3] As Rav Moshe Shmuel Glassner explains in his introduction to his Dor Revii (so named because he was the eldest great-grandson of the Chatam Sofer), the great period of innovation of the Oral Law came to a close when, due to historical circumstances, the Oral Law needed to be put to writing. This will once again change with the return of the Jewish people to the Land of Israel, and the reestablishment of the Sanhedrin.
Photo of Spanish walled city of Morella by Rich Whitaker.