The first mention the miracle of the oil is the Babylonian Talmud, compiled in around 500 CE (over 600 years after the Maccabean Revolt ended).
מַאי חֲנוּכָּה? דְּתָנוּ רַבָּנַן: בְּכ״ה בְּכִסְלֵיו יוֹמֵי דַחֲנוּכָּה תְּמָנְיָא אִינּוּן דְּלָא לְמִסְפַּד בְּהוֹן וּדְלָא לְהִתְעַנּוֹת בְּהוֹן. שֶׁכְּשֶׁנִּכְנְסוּ יְוָוֽנִים לַהֵיכָל טִמְּאוּ כׇּל הַשְּׁמָנִים שֶׁבַּהֵיכָל. וּכְשֶׁגָּבְרָה מַלְכוּת בֵּית חַשְׁמוֹנַאי וְנִצְּחוּם, בָּדְקוּ וְלֹא מָצְאוּ אֶלָּא פַּךְ אֶחָד שֶׁל שֶׁמֶן שֶׁהָיָה מוּנָּח בְּחוֹתָמוֹ שֶׁל כֹּהֵן גָּדוֹל, וְלֹא הָיָה בּוֹ אֶלָּא לְהַדְלִיק יוֹם אֶחָד. נַעֲשָׂה בּוֹ נֵס וְהִדְלִיקוּ מִמֶּנּוּ שְׁמוֹנָה יָמִים. לְשָׁנָה אַחֶרֶת קְבָעוּם וַעֲשָׂאוּם יָמִים טוֹבִים בְּהַלֵּל וְהוֹדָאָה.
The Gemara asks: What is Hanukkah, and why are lights kindled on Hanukkah? The Gemara answers: The Sages taught in Megillat Ta’anit: On the twenty-fifth of Kislev, the days of Hanukkah are eight. One may not eulogize on them and one may not fast on them. What is the reason? When the Greeks entered the Sanctuary they defiled all the oils that were in the Sanctuary by touching them. And when the Hasmonean monarchy overcame them and emerged victorious over them, they searched and found only one cruse of oil that was placed with the seal of the High Priest, undisturbed by the Greeks. And there was sufficient oil there to light the candelabrum for only one day. A miracle occurred and they lit the candelabrum from it eight days. The next year the Sages instituted those days and made them holidays with recitation of hallel and special thanksgiving in prayer and blessings.
- The rabbis did not deny the military victory, but removed it from being the central focus of celebration.
- They acknowledge the central victory in terms of re-dedicating the Beit Hamikdash by calling the festival "Chanukah" ("dedication")
- The rabbis effectively rebranded the holiday so that instead of glorifying Hasmonean military prowess, the holiday instead glorifies the unconditional and miraculous divine light that Jews can depend on, even in the gloomiest of darkness.
With regard to the dates of these festivals, the Sages taught: When Adam the first man saw that the day was progressively diminishing, as the days become shorter from the autumnal equinox until the winter solstice, he did not yet know that this is a normal phenomenon, and therefore he said: Woe is me; perhaps because I sinned the world is becoming dark around me
[...]
He arose and spent eight days in fasting and in prayer. Once he saw that the season of Tevet, i.e., the winter solstice, had arrived, and saw that the day was progressively lengthening after the solstice, he said: Clearly, the days become shorter and then longer, and this is the order of the world. He went and observed a festival for eight days. Upon the next year, he observed both these eight days on which he had fasted on the previous year, and these eight days of his celebration, as days of festivities. He, Adam, established these festivals for the sake of Heaven, but they, the gentiles of later generations, established them for the sake of idol worship [kalenda and saturna, two Greco-Roman festivals].
Introduction to Megillat Taanit from Conservative Yeshiva:
Megillat Taanit, the “Scroll of Fasts” is an ancient list of holidays, written in Aramaic, on which it is forbidden to fast or mourn. Many of these holidays are associated with Jewish military victories over Greeks and Romans during the Second Temple period. Many of the dates have been forgotten and haven’t been observed for thousands of years. However, the most famous of these holidays is still observed. The date records the victory of the Hasmoneans over Antiochus Epiphanes, and it is the basis of the Hanukkah holiday.
The “Scholion” is an attempt by later rabbis to write a commentary to Megillat Taanit. Traditional Jews sometimes call this text the “commentary to the Megillat Taanit.” We don’t know when the Scholion was written, but probably during the Talmudic period, from 300-600 C.E. The text of the Scholion has remained somewhat open to insertions, embellishments and changes throughout its history.
מגילת תענית הסכוליון כ"י פרמה
בעשרין וחמשה ביה חנכתא תמניא יומין ודלא למספד.
מפני שטמאו גוים את בית המקדש וכשתקפה מלכות בית חשמונאי בדקוהו ומצאו בו שמן טהור והדליקו בו את הנרות כל אותן ימים שהדליקו בהם את הנרות עשאום יום טוב.
Megillat Taanit, Scholion, Parma Manuscript
On the twenty-fifth day [of Kislev] is Hannukah. Eight days in which one may not mourn.
Because the gentiles defiled the Temple, and when the Hasmoneans overcame them, they checked and they found pure oil and they lit the lamps. All of those days that they lit the lamps they made into a festival
(כב) וחגותם אותו כימי חג הסוכות, וכיום אשר מצא בו נחמיה את אש הקודש בשובו לבנות את המקדש ואת המזבח, ויקרב עליו עולות וזבחים לאלוהים.
(22) You will celebrate it like the days of the festival of booths, and like the day that on it Nehemiah found the holy fire during his return to build the temple and the altar. He offered on it burnt offerings and sacrifices to God.
(ח) ומאת ה' הייתה זאת לחטא את הבית בעצם היום ההוא אשר טימאו אתו הגויים, והוא יום העשרים וחמשה לירח כסלו.
(ט) ויחוגו חג לה' שמונת ימים כימי חג הסוכות, ויזכרו את הימים מקדם בחגגם את חג הסוכות בהרים ובמערות, ויתעו בישימון כבהמות שדה.
(י) ויקחו ערבי נחל וכפות תמרים וישירו שיר שבח והודיה לה', אשר נתן להם עוז ותשועה לטהר את בית מקדשו.
(יא) ויעבירו קול בכל ערי יהודה לחוג את החג הזה מדי שנה בשנה.
(8) And from the Lord it was this, to purge the House on the same day that the nations defiled it, and it was the twenty-fifth day of the month of Kislev.
(9) And they celebrated the Festival to the Lord for eight days, like the festival of Sukkot, and they remembered the previous days when they celebrated of the festival of Sukkot in the mountains and in the caves, and they went out in the desolation/wilderness, like wild beasts.
(10) And they took the willows of the brook and the branches of palm trees, they and sang a song of praise and thanksgiving to the Lord, who gave them courage and salvation to purify the temple of his holiness.
(11) And they sent a voice in all the cities of Judah to celebrate this festival every year.
According to a Midrash the Greeks issued a decree forbidding the Jews to observe the Sukkot festival, and they were unable to bring the sacrificial offerings of Sukkot in the Beit Hamikdash. Hence, Hashem said, “You wanted to abolish the eight days of Sukkot; I will therefore give them an additional festive period of eight days — Chanukah.”
(מדרש חנוכה ח"א קל"ד, א. סדר הדורות ג"א תרכ"ב, וערוך השלחן עת"ר סעי' ה)
1. Offerings on Sukkot and kindling lights on Channukah
(12) On the fifteenth day of the seventh month, you shall observe a sacred occasion: you shall not work at your occupations.—Seven days you shall observe a festival of יהוה.—
תָּנוּ רַבָּנַן: מִצְוַת חֲנוּכָּה, נֵר אִישׁ וּבֵיתוֹ.
[...]
בֵּית שַׁמַּאי אוֹמְרִים: יוֹם רִאשׁוֹן מַדְלִיק שְׁמֹנָה, מִכָּאן וְאֵילָךְ פּוֹחֵת וְהוֹלֵךְ. וּבֵית הִלֵּל אוֹמְרִים: יוֹם רִאשׁוֹן מַדְלִיק אַחַת, מִכָּאן וְאֵילָךְ מוֹסִיף וְהוֹלֵךְ.
[...]
חַד אָמַר טַעְמָא דְּבֵית שַׁמַּאי כְּנֶגֶד יָמִים הַנִּכְנָסִין, וְטַעְמָא דְּבֵית הִלֵּל כְּנֶגֶד יָמִים הַיּוֹצְאִין. וְחַד אָמַר טַעְמָא דְּבֵית שַׁמַּאי כְּנֶגֶד פָּרֵי הַחַג
The Sages taught in a baraita: The basic mitzva of Hanukkah is each day to have a light kindled by a person, the head of the household, for himself and his household.
[...]
Beit Shammai say: On the first day one kindles eight lights and, from there on, gradually decreases the number of lights until, on the last day of Hanukkah, he kindles one light. And Beit Hillel say: On the first day one kindles one light, and from there on, gradually increases the number of lights until, on the last day, he kindles eight lights.
[...]
One said that the reason for Beit Shammai’s opinion is that the number of lights corresponds to the incoming days, i.e., the future. On the first day, eight days remain in Hanukkah, one kindles eight lights, and on the second day seven days remain, one kindles seven, etc.
[...]
And one said that the reason for Beit Shammai’s opinion is that the number of lights corresponds to the bulls of the festival of Sukkot: Thirteen were sacrificed on the first day and each succeeding day one fewer was sacrificed (Numbers 29:12–31).
(א) הֶחָלִיל חֲמִשָּׁה וְשִׁשָּׁה. זֶהוּ הֶחָלִיל שֶׁל בֵּית הַשּׁוֹאֵבָה, שֶׁאֵינָה דּוֹחָה לֹא אֶת הַשַּׁבָּת וְלֹא אֶת יוֹם טוֹב. אָמְרוּ, כָּל מִי שֶׁלֹּא רָאָה שִׂמְחַת בֵּית הַשּׁוֹאֵבָה, לֹא רָאָה שִׂמְחָה מִיָּמָיו:
(1) The flute is played on the festival of Sukkot for five or six days. This is the flute of the Place of the Drawing of the Water, whose playing overrides neither Shabbat nor the Festival. Therefore, if the first Festival day occurred on Shabbat, they would play the flute for six days that year. However, if Shabbat coincided with one of the intermediate days of the Festival, they would play the flute for only five days. One who did not see the Celebration of the Place of the Drawing of the Water never saw celebration in his days.
(ג) מִבְּלָאֵי מִכְנְסֵי כֹהֲנִים וּמֵהֶמְיָנֵיהֶן מֵהֶן הָיוּ מַפְקִיעִין, וּבָהֶן הָיוּ מַדְלִיקִין, וְלֹא הָיְתָה חָצֵר בִּירוּשָׁלַיִם שֶׁאֵינָהּ מְאִירָה מֵאוֹר בֵּית הַשּׁוֹאֵבָה:
(3) From the worn trousers of the priests and their belts they would loosen and tear strips to use as wicks, and with them they would light the candelabra. And the light from the candelabra was so bright that there was not a courtyard in Jerusalem that was not illuminated from the light of the Place of the Drawing of the Water.
(יב) מִצְוַת נֵר חֲנֻכָּה מִצְוָה חֲבִיבָה הִיא עַד מְאֹד וְצָרִיךְ אָדָם לְהִזָּהֵר בָּהּ כְּדֵי לְהוֹדִיעַ הַנֵּס וּלְהוֹסִיף בְּשֶׁבַח הָאֵל וְהוֹדָיָה לוֹ עַל הַנִּסִּים שֶׁעָשָׂה לָנוּ.
(12) The mitzvah of kindling Chanukah lamps is very dear. A person should be very careful in its observance to publicize the miracle and thus increase our praise of God and our expression of thanks for the miracles which He wrought on our behalf.
(42) You shall live in booths seven days; all citizens in Israel shall live in booths, (43) in order that future generations may know that I made the Israelite people live in booths when I brought them out of the land of Egypt—I, your God יהוה.
וְהַמְהַדְּרִין, נֵר לְכׇל אֶחָד וְאֶחָד. וְהַמְהַדְּרִין מִן הַמְהַדְּרִין
And the mehadrin, i.e., those who are meticulous in the performance of mitzvot, kindle a light for each and every one in the household. And the mehadrin min hamehadrin, who are even more meticulous, adjust the number of lights daily.
דְּתַנְיָא: ״זֶה אֵלִי וְאַנְוֵהוּ״, הִתְנָאֵה לְפָנָיו בְּמִצְוֹת: עֲשֵׂה לְפָנָיו סוּכָּה נָאָה, וְלוּלָב נָאֶה...
What is the source for the requirement of: “This is my God and I will glorify Him”? As it was taught in a baraita with regard to the verse: “This is my God and I will glorify Him [anveihu], the Lord of my father and I will raise Him up.” The Sages interpreted anveihu homiletically as linguistically related to noi, beauty, and interpreted the verse: Beautify yourself before Him in mitzvot. Even if one fulfills the mitzva by performing it simply, it is nonetheless proper to perform the mitzva as beautifully as possible. Make before Him a beautiful sukka, a beautiful lulav...
