The parshiyos of Vayeishev and Mikeitz are always read around the time of Chanukah. What is the connection between these parshiyos and the miracle of Chanukah?
One of the distinguishing features of Yosef throughout his experiences in Mitzrayim is his fervent belief in hashgacha pratis (Divine Providence). The pasuk describes that when Yosef is successful in Potiphar's home, "His master saw that Hashem was with him, and that Hashem brought him success in all his endeavors" (Vayeishev 39:3). How did his master know that Hashem was the source of his accomplishments? Rashi explains that G-d's name was constantly on Yosef's lips - sheim shamayim shagur b'fiv. Therefore, when Yosef was successful, Poitphar naturally attributed that success to the G-d that Yosef always mentioned.
When the head butler and head baker are troubled by their dreams, Yosef tells them, "Don't interpretations of dreams belong to G-d? Tell me (your dreams) if you please" (Vayeishev 40:8). Similarly, when Pharoh says to Yosef that he heard Yosef can interpret dreams, Yosef answers, "That is beyond me; it is G-d who will respond with Pharoh's welfare" (Mikeitz 41:16). Rashi and Sforno explain that Yosef was saying that only Hashem can enable him to interpret Pharoh's dreams.
Later, when Yosef reveals himself to his brothers, he tells them, "And now, do not be distressed, nor be angry with yourselves, for having sold me here, for it was to be a provider that G-d sent me ahead of you" (Vayigash 45:5). After Yaakov's death, when Yosef's brothers beg his forgiveness for having sold him, Yosef responds once again that they have nothing to fear. "Although you intended me harm, G-d intended it for good" (Vayechi 50:20). Yosef constantly attributed his success to Hashem, and he realized that all his trials and tribulations were divinely ordained.
This ability to see Hashem's hand in all of life's experiences is something Yosef learned from his father Yaakov. On his journey to Lavan's home, Yaakov asks Hashem to protect him and provide for him (Vayeitzei 28:20). And on his way back to his parents' home, Yaakov tells his family, "Let us go up to Beis-El, and I will make there an altar for G-d who answered me in my time of distress, and was with me on the road that I traveled" (Vayishlach 35:3).
When Yaakov is reunited with Yosef after twenty-two years of separation, the pasuk says that Yosef cried on Yaakov's shoulders, but it does not mention Yaakov crying (Vayigash 46:29). Chazal comment that Yaakov was instead reciting the shema at that time (see Rashi there). The Maharal (Gur Aryeh there) explains that Yaakov was not reciting the shema to fulfill the mitzvah of kriyas shema, but rather as an expression of love and appreciation toward Hashem for reuniting him with his beloved son.
Yaakov understood that Hashem had orchestrated all his experiences in life - the pleasant ones and the challenging ones. They had all emerged from the same Source - Hashem Elokeinu Hashem echad. Even the difficulties which seemed to emanate from Hashem's middas hadin (attribute of judgement - Elokim) really stemmed from his middas harachamim (attribute of mercy) - Hashem echad. This is a lesson that Yaakov imparted to Yosef, and that is why Yosef constantly expressed his belief that Hashem was in control of all that happened to him.
The miracle of Chanukah involving the jug of oil gave the Jewish people a heightened appreciation for Hashem's involvement in their lives. As the commentators point out (see Penei Yehoshua, Shabbos 21b, among others), since ritually impure oil may be used to light the menorah (tumah hutrah b'tzibbur), the miracle of the jug of oil was not even necessary. But Hashem wanted to show his love for Klal Yisrael, to reinforce their understanding that even when His presence is not readily apparent, He still is watching over them and orchestrating events from behind the scenes.
This message was especially significant for the Jews of that time. After all, one of the decrees the Greeks had issued against the Jews was to forbid them from even mentioning G-d's name (Rosh Hashana 18b). After the Chashmonaim defeated the Greeks, they instituted that people should mention G-d's name even in their legal documents. The Greeks wanted to remove G-d from the public square. Making reference to G-d's name reminds man that ultimately he will be held accountable to a Higher Authority for his actions. Talking about G-d and religion forces man to reassess his sense of priorities; it gives him a different focus in life. The Greeks fought to suppress these values.
After the Greeks were defeated, Chazal wished to reaffirm the importance of recognizing Hashem's presence in this world by instituting that Hashem's name should be mentioned even more frequently than before. Although this enactment was later abolished for certain practical reasons, the intent of the decree remains as relevant as ever, because the more people mention Hashem's name, the more they connect with Him, and the more they appreciate how involved He is in their lives. The miracle of the jug of oil served to further highlight this idea, to remind us that Hashem is still watching over the Jewish people, even in our darkest moments, even when His presence seems hidden.
Chazal say (Shabbos 22a) that the best way to perform the mitzvah of ner Chanukah is to light near the doorway of a home, on the left side of the entrance, so that the mezuzah will be on the right side, and the Chanukah lights will be on the left. The Mishna Berura (671:33) explains that this is to ensure that a person is surrounded by mitzvos on all sides. But perhaps there is a deeper connection between the mezuzah and the Chanukah lights. The Rambam (Hilchos Mezuzah 7:13) writes that the purpose of the mitzvah of mezuzah is to remind a person of Hashem every time he passes his doorstep, and that will keep him focused on the path of Torah and mitzvos. It is not surprising then that Chazal instituted that the Chanukah lights and the mezuzah should be placed on either side of the doorway because both of these mitzvos serve the same purpose, namely, to remind us of Hashem's presence in our lives.
May we merit this Chanukah to see Hashem's light, His love and salvation, for us and the entire Jewish people.
More divrei Torah from Rabbi Koenigsberg