The gemara in Megillah (13b) says:
"אמר ריש לקיש גלוי וידוע לפני מי שאמר והיה העולם שעתיד המן לשקול שקלים על ישראל לפיכך הקדים שקליהן לשקליו והיינו דתנן באחד באדר משמיעין על השקלים ועל הכלאים"
“Reish Lakish says that it was revealed before the one who created the world that Haman would pay shekalim to kill the Bnei Yisroel. Therefore, our shekalim preceded his shekalim as we learn in the Mishna “On the first of Adar they make the appeal for shekalim”.
The gemara is referring to the fact that המן offered אחשׁורושׁ 10,000 shekalim to kill the בני ישראל. In anticipation of this, הקב"ה instituted that every year a half shekel would be collected for use in the Beis HaMikadash. The question is what is the connection between the yearly donation of a half-shekel to the shekalim that המן paid אחשׁורושׁ. Furthermore, the story of Purim took place in golus when there was no Beis HaMikdash and consequently there were no shekalim being collected. How then did these shekalim have the ability to overturn the gezeirah of המן.
In order to understand this gemara we need to uinderstand what the shekalim represented. The מדרש תנחומא (פרשׁת כי תשא סימן ג) says that that הקב"ה told משׁה רבינו that by reading פרשׁת שׁקלים every year it is as if משׁה רבינוhimself is here and raising us up. Rav Tzaddok(פרי צדיק פרשׁת שׁקלים) explains that פרשׁת שׁקלים begins with the phrase "כי תשא את ראשׁ" because the act of "נשיאת ראשׁ" implies that you are raising that person over someone else and making him the leader. When הקב"ה commanded משׁה to raise up בני ישראל he was telling משׁה that each individual Jew has the ability to be the best in one area. The מדרשׁ says that the תורה could only be given with 600,000 Jews. If one of them was missing there is something missing from כלל ישראל. Just like a sefer torah is posul if one letter is missing so too בני ישראל are not complete if there are less than 600,000 Jews, and an incomplete כלל ישראל can’t get the Torah. Rav Tzadok says that this מדרשׁ teaches us that each person from כלל ישראל has a part of his נשׁמה that is unique and that noone else has. This unique part of a person is brought out through לימוד התורה. This is the reason why we say "איזה הוא חכם הלומד מכל אדם". Since each person has his own חלק in תורה, everyone has something to teach others that only he can teach. Furthermore, this חלק of a person ultimately has its roots in the חכמה of הקב"ה and is considered to be a חלק אלוק ממעל. Rav Tzaddok adds that this concept does not just apply to learning Torah. The גמרא (תענית כא.) says that each person has his time in which הקב"ה wants/needs that unique chelek of good that a person possesses. When this time comes, that person is raised up above everyone.This concept, Rav Tzaddok writes is what the shekalim come to reinforce. When a person gives his half-shekel, he is showing that he is an individual who can make his own unique contribution to the תורה and to כלל ישראל. When the מדרשׁ says a person is raised up to the top over everyone else, it doesn’t mean he is better than everyone but rather it means that he is the best person to fulfill his unique role.
In order to answer what this has to do with defeating המן we have to understand what המן represents. The מדרשׁ תנחומא (כי תצא ט) writes "עמלק, עם שׁבא ללק דמן שׁל ישראל ככלב" . עמלק is a nation that laps up the blood of בנ"י like a dog. Rav Tzaddok (פרשׁת זכור) explains that עמלק’s war against בנ"י comes on two levels. At first he seduces and convinces us to do aveiros However, even after we have sinned and fallen, עמלק comes along to make us fall even further. He convinces us that all is lost and there is no hope. He creates in us a
sense of יאושׁ and once we are מייאשׁ, we give up hope of doing teshuva. After all, why should we do teshuva if there is no point to anything. This is why עמלק is compared to a dog that laps up the leftover blood. Whatever self worth we have left after doing an aveirah is destroyed by עמלק. He comes along and sucks all the life out of us.
This idea can be applied to the story of פורים. The בני ישראל were in golus as a punishment for their aveiros. By taking part in the סעודת אחשׁורושׁ we were exhibiting the signs of יאושׁ. אחשׁורושׁ was celebrating our גלות and we joined him in the celebration. Is there any greater יאושׁ than celebrating one’s own downfall? Shortly after, המן comes along and takes advantage of our יאושׁ to try and totally destroy us. המן told אחשׁורושׁ that we were an עם מפוזר ומפורד. According to what we have been saying we explain that one sign of יאושׁ is not recognizing that we are all in this toether. Giving up hope on the גאולה is tantamount to saying that כלל ישראל as a nation, as an עם הנבחר is a relic of the past. By not recognizing that we are in fact one nation, we were showing signs of being an עם מפוזר ומפורד.
הקב"ה foresaw that this would happen, so He decided to teach us many years before the Purim story that this attitude is not correct. This lesson was taught to us through the שׁקלים. As we explained from Rav Tzaddok, the shekalim reinforce the idea that each person is a חלק אלוק ממעל and has a unique purpose and goal in life. However, it is not just that we each have a tachlis, but that tachlis comes through connecting to הקב"ה and his תורה. The unique חלק that each of has in תורה, also serves to connect us to to each other through the Torah. Since my fellow Jew has something in תורה that I don’t have, I need him to teach me that part of תורה. At the same time that each of us can create our own individuality through the תורה, we also are connected as one nation through the תורה. The shekalim teach us that we are not an עם מפוזר ומפורד but rather an עם סגולה and a ממלכת כהנים וגוי קדשׁ. This lesson of the שׁקלים was reinforced everytime we donated our half-shekel year after year on ר" אדר.
Perhaps with this idea we can understand another גמרא regarding the שׁקלים of המן.The gemara (מגילה טז.) says that when המן came to put מרדכי on the horse of ,אחשׁורושׁ he found the תלמידים studying the laws of קמיצה that applied to the קרבן עומר. המן commented that their studying the laws of קמיצה pushed away the 10,000 shekalim that he paid אחשׁורושׁ. What is the connection between the 10,000 shekalim paid to אחשׁורושׁ and the halachos of קמיצה? The significance of this is that not only were the תלמידים of מרדכי connecting to each other through לימוד התורה, but that day was the 16th day of ניסן, the day when the קרבן עומר would have been brought in the בית המקדשׁ. The בנ"י were learning halachos מענינא דיומא that only applied בזמן הבית. Through their learning they were showing that they were no longer in a state of יאושׁ. They had finally accepted and internalized the lesson of שׁקלים that had been taught to them year after year. בּנ"י finally recognized that they were and always will be connected to הקב"ה. When המן saw that the בנ"י had realized this, he realized his plan was going to fail.
Finally, with this מהלך it is very understandable why there was a new קבלת התורה of תורה שׁבעל פה. The entire lesson of the שׁקלים is that we each have our own חלק and כח החידושׁ in the תורה. This חלק is brought out by the חדושׁים that we are מחדשׁ in תורה שׁבעל פה. [In fact we find this idea in the מגילה. The גמרא tells us that "ויעבר מרדכי" refers to the fact that מרדכי decreed a fast day on the first days of פסח. מרדכי used his כח החידושׁ to lead the בנ"י during this עת צרה]. Once בנ"י recognized and appreciated how everyone has their unique part in תורה, it naturally led to a reenergizing of לימוד התורה and a new קבלת התורה on the part of כלל ישראל.