The Jews […] celebrated the fourteenth day of the month of Adar with gladness and feasting, as a holiday, and for sending presents to one another.
And Mordecai wrote these things and sent letters to all the Jews […] that they should celebrate yearly the fourteenth and fifteenth days of the month of Adar, as the days on which the Jews had rest from their enemies, as the month which was turned from sorrow to joy for them, from mourning to a holiday; that they should make them days of feasting and joy, of sending presents to one another and gifts to the poor.
So the Jews accepted the custom which they had begun, as Mordecai had written to them, because Haman […] had plotted against the Jews to annihilate them, and had cast Pur (that is, the lot) to consume them and destroy them; but when Esther came before the king, he commanded by letter that this wicked plot which Haman had devised against the Jews should return on his own head.
So they called these days Purim, after the name Pur.
Esther 9:19-26 NKJV (paraphrased)