(5) And the Jews smote all their enemies with the stroke of the sword, and with slaughter and destruction, and did what they would unto them that hated them. (6) And in Shushan the castle the Jews slew and destroyed five hundred men.
Raba said: A man is obligated to mellow oneself [get drunk] until he does not know the difference between 'cursed is Haman' and 'Blessed is Mordechai.'
(ב) חייב אינש לבסומי בפוריא עד דלא ידע בין ארור המן לברוך מרדכי: הגה: וי"א דא"צ להשתכר כל כך אלא שישתה יותר מלימודו (כל בו) ויישן ומתוך שיישן אינו יודע בין ארור המן לברוך מרדכי (מהרי"ל) ואחד המרבה ואחד הממעיט ובלבד שיכוין לבו לשמים
(2) One is obligated to be intoxicated on Purim to the point where he does not know [the difference] between "accursed is Haman" and "blessed is Mordechai". Rama: Some say it is not necessary to become drunk so much, but rather to drink more than he is used to (Kol Bo), and to fall asleep, and while he sleeps he does not know [the difference] between "accursed is Haman" and "blessed is Mordechai" (Maharil). [There is no difference] between one who has more and one who has less, as long as his heart is directed to heaven.
Be'ur Halachah, 695
"A person is obligated." One might ask, how can the sages obligate that which is mentioned in the Torah, Prophets, and other places, namely that drunkenness is a great pitfall? It is because all the miracles that were wrought for the Jewish people in the days of Ahasuerus were on account of drinking. In the beginning, Vashti was bothered on account of drinking and Esther came. Also, Haman's downfall was on account of drinking. Therefore, the sages obligate us to drink so that the great miracle will be remembered with wine drinking. In any case, this is a mitzvah but not an indispensable condition.
"He will not be aware [of the difference]." We should not become drunk and demean ourselves by rejoicing. We are not commanded to rejoice for the sake of debauchery and stupidity, rather we should rejoice with a delight that leads us to love G-d and acknowledge the miracles wrought for us.