18 Then Melchizedek king of Salem brought out bread and wine; he was the priest of God Most High.
19 And he blessed him and said: “Blessed be Abram of God Most High, Possessor of heaven and earth;
20 And blessed be God Most High, Who has delivered your enemies into your hand.” And he gave him a tithe of all.
21 Now the king of Sodom said to Abram, “Give me the persons, and take the goods for yourself.”
22 But Abram said to the king of Sodom, “I have raised my hand to the Lord, God Most High, the Possessor of heaven and earth,
23 that I will take nothing, from a thread to a sandal strap, and that I will not take anything that is yours, lest you should say, ‘I have made Abram rich’—
24 except only what the young men have eaten, and the portion of the men who went with me: Aner, Eshcol, and Mamre; let them take their portion.”
[Melchizedek] is referred to nine hundred years later by King David (Psalm 110:4) and one thousand years later than that by the writer of the Epistle to the Hebrews (Hebrews 5:6, 10; 6:20; 7:1-21), where he is mentioned by name no less than nine times!
His name means “King of Righteousness” (Hebrews 7:2), and his title “King of Salem” means also “King of Peace.” For an individual to have such a name in such a place as Canaan, filled with wickedness and demonism as it was is sufficiently remarkable in itself. All indications, however, show that his name was appropriate. He is the first priest mentioned in the Bible (and this is also the first mention of “peace”), and he obviously had a unique relation to the true God. He used the name El Elyon (the “most high God”) to stress the absolute superiority of God to the multitude of gods and goddesses worshiped in Canaan. He also identified God as “the possessor of heaven and earth,” thus referring back to Genesis 1. Abram gladly recognized Melchizedek as representing the same God, who had called him to Canaan, and he “gave him tithes of all.” Melchizedek had brought bread and wine and, assuming this was meant for the refreshment of the weary fighters and travelers, it would have required a very large amount. — Morris, page 318
Abram gave a tenth of “all” to Melchizedek. This is the first mention of tithing in the Bible. It is normally assumed that this refers to a tithe of the spoils of the battle, but Scripture does not actually say so. It is possible that Abram, overwhelmed by the presence and blessing of Melchizedek, really did give him a tenth of all that he had.
As far as the actual spoils of battle were concerned, the king of Sodom (who had in the meantime reappeared from the slimepits where he had fled from the armies of the four kings) recognized that their recover was due entirely to Abram, and told him to take all the goods, returning only the people who were captives back to their homes. Abram, however, knew that the victory was not due to him, but to God, and would not take any of the goods. — Morris, pages 321-322
Two of my commentaries state that Melchizedek appeared at this moment to remind Abram that he had been blessed by God and, therefore, did not need the material things offered to him by the king of Sodom, the taking of which would have made him indebted to the evil king. The text doesn’t say this. I don’t know if that was part of the purpose of Melchizedek’s appearance, but it did certainly have that effect.
It is indispensable to a full appreciation of of the canonical significance of Melchizedek that one bear in mind the consistent principle that, in the general priestly economy of God, the nature of the priest inevitably and commensurately determines the nature of his priestly work (cf. Hebrews 7:26-28). It is for this reason, we believe, that the discussion of Melchizedek in Hebrews 7 commences with an explicit discussion of the titles/names (there being no semantic distinction between names and titles in biblical Hebrew) by which he is here introduced—namely, Melchizedek, meaning “King of Righteousness,” and King of Salem, meaning “King of Peace.” In other words, insofar as “righteousness” and “peace,” as biblically defined, are qualities centered in and administered by God, the implication right at the outset is that Melchizedek is none other than God Himself—yet another example of the many theophanies in the Hebrew Bible. Indeed, reflective of their divine connotation, these two titles/names are not employed for any other individual—king, priest, or otherwise—in Israel, and the two names employed within an Israelite context that come semantically closest to these are, not surprisingly, prophetically applied to the Messiah in His eschatological role of eternal priest-king—to wit, “the Lord our righteousness” in Jeremiah 23:6 and “Prince of Peace” in Isaiah 9:6.
This identification of Melchizedek with God thus explains why Abram immediately recognized and submitted to Melchizedek’s superiority—not simply out of social respect, but as an expression of faith and worship, allowing himself to be blessed (which typically proceeds from “greater”; cf. Hebrews 7:7) and responding by giving Melchizedek a tithe, which is portrayed throughout the Hebrew Bible as a specific act of worship. The implication of Melchizedek’s deity is further explicated in Hebrews 7 by (1) the contrast in verse 8 between the receiving of tithes by the Levites, who are “mortal men,” and the receiving of tithes by Melchizedek, who “lives on” (i.e., who is immortal); and (2) the statement in verse 3 that he—that is, per the context, Melchizedek in Genesis 14—”abides a priest perpetually.” This begs the question: if Jesus , as the writer of Hebrews goes on to state, “abides forever” (Hebrews 7:24) in the role of high priest “after the order of Melchizedek” (Hebrews 7:17)—and there can only be one high priest—then how can the Melchizedek of Genesis 14, whom we are told “abides [present tense!] a priest perpetually” (Hebrews 7:3), be anyone other than Christ, the believer’s great high priest?— Wechsler, pages 184-185
For the record, I agree with Wechsler. Melchizedek was Jesus Christ in a pre-incarnate appearance.