He was the king of Jerusalem ("Shalem") in Abraham's time (Gen. 14:18). The
Targum and the Talmud identify him with Shem the son of Noah (Nedarim 32b).
He was also a priest; the Rabbinical sources give no details about his
priesthood, but they indicate that he was not as worthy a person as Abraham.
The people who passed down religious traditions from Adam to Abraham and his
descendants include Shem. On the identification of Shalem with Jerusalem
see Psalms 76:3. The commentaries point out that Jerusalem was referred to
as the City of Justice (Isaiah 1:26) and its kings were called "King of
Justice" (Malki-Tzedek: Gen: 14:18) or "Lord of Justice" (Adoni-Tzedek:
Joshua 10:1). For additional information (and other viewpoints) see the
article Melchizedek in the Encyclopedia Judaica, Vol. 11, Cols. 1287-9.
Ask a follow-up question