The story of Purim is found in the Book of Esther, one of the books in the Ketuvim (Writings) section of the Bible. It is set in the land of Persia (current day Iran) at the time when Ahashverosh was king. King Ahashverosh held a banquet in the capital city of Shushan and ordered his queen, Vashti, to come and dance before his guests. She refused to appear and lost her royal position.
Acting on advice from his counselors, Ahashverosh held a pageant to choose a new queen. Mordechai, a Jewish man living in Shushan, encouraged his cousin, Esther, to enter the competition. Esther won but, following the advice of her cousin, did not reveal her Jewish origin to the king.
Mordechai often sat near the gate of the king's palace. One day he overheard two men, Bigthan and Teresh, plotting to kill the king. Mordechai reported what he had heard to Esther. She then reported the information to the king. The matter was investigated and found to be true, and Bigthan and Teresh came to an unfortunate end. Mordechai's deed was recorded in the king’s diary.
Meanwhile, the king's evil adviser, Haman, paraded through the streets, demanding that all bow down to him. Because Jews do not bow to anyone but God, Mordechai refused to bow down to Haman. Upon learning that Mordechai was Jewish, Haman decided to kill all the Jews in the Persian empire. He plotted to kill them—convincing King Ahashverosh to go along with the plan—and cast purim ("lots," plural of pur), a kind of lottery, to determine the day on which he would carry out his evil deed: the 13th of Adar.
However, Mordechai alerted Esther to Haman's evil plot, and Esther, in turn, revealed her Jewish identity to the King, convincing him to save the Jews and foiling Haman's plot. Haman was hanged, Mordechai received his estates and the position of royal vizier, and the Jews of Persia celebrated their narrow escape on the 14th of Adar, the day after they were supposed to be annihilated.
Thus, the fate Haman had planned for the Jews became his own. The holiday of Purim celebrates the bravery of Esther and Mordechai and the deliverance of the Jewish people from the cruelty of oppression.
Although Purim is observed in most places on the 14th of Adar, in Jerusalem, it is celebrated on the 15th. M’gillat Esther explains, “on the thirteenth day of the twelfth month—that is the month of Adar—when the king’s command and decree were to be executed, the very day on which the enemies of the Jews intended to have rule over them, the opposite happened, and the Jews prevailed over their adversaries.” The Jews fought and won on the 13th of Adar and celebrated the following day. However, M’gillat Esther continues by explaining that the Jews did not defeat their enemies until the 14th of Adar in the walled city of Shushan. Therefore, cities that were enclosed during the time of Joshua do not celebrate until the 15th of Adar, which has been appropriately named Shushan Purim. Because of the significance of Jerusalem, Purim is celebrated on Shushan Purim.