"And he blessed him and said, [Blessed be Abram... and blessed be God Most High]." Because he gave precedence to the blessing of Abraham over the blessing of the Holy One, blessed be He, therefore the priesthood was taken from him and given to Abraham, as it is said, "The Lord has sworn and will not relent: You are a priest forever" (Psalms 110:4).
Why Melchizedek Lost the Priesthood to Abraham
Midrash Aggadah, Genesis 14:19
ויברכהו ויאמר [ברוך אברם וגו' וברוך אל עליון]. לפי שהקדים ברכת אברהם לברכת הקב"ה, לפיכך ניטלה הכהונה ממנו וניתנה לאברהם, שנאמר נשבע ה' ולא ינחם אתה כהן לעולם (תהלים קי ד):