The feast of Purim is the most festive of the Jewish holidays. The festival commemorates a victory over oppression and the deliverance from death of the Jews of Persia.
In the Bible, the event is recorded in the book of Esther. A Jew named Mordecai refused to bow and pay homage to Haman, second in command to King Xerxes. This so angered Haman that he vowed to kill not only Mordecai, but all his people (the Jews) living in Xerxes' kingdom.
'In the first month, the month of Nissan, they cast the pur (that is, the lot) in the presence of Haman to select a day and month. And the lot fell on the twelfth month, the month of Adar.' Esther 3:7
Meanwhile, Haman falsely accused the Jews of disloyalty and obtained from the king the necessary seal to carry out his plan. However, he had overlooked the fact that Esther, the King's wife, was a Jewess and also a relation of Mordecai. She exposed Haman's wickedness to the king, who discovered that Mordecai had saved his life on a previous occasion without receiving any recognition for his loyalty.
The king ordered that Haman should be executed on the gallows, which Haman himself had erected for the execution of Mordecai. So the Jews were saved from death and their enemy was slain. Mordecai instructed the Jews to, 'Celebrate annually the 14th and 15th days of the month of Adar as the time when the Jews got relief from their enemies, and as the month when their sorrow was turned into joy and their mourning into a day of celebration... to observe the days as days of feasting and joy and giving presents of food to one another and gifts to the poor.' Esther 9:20-22