This is a bit misleading because the Greek does not say THE law (which suggests the law of Moses), but simply law. The implication being, of course, that faith (a commandment) is not lawless, but a commandment that fulfills the law of Moses. The other commandment is love. The one who does these two things has fulfilled all of the law of Moses and does not come under condemnation, and is well pleasing to GOD.
LEVITICUS 19:10-18, "You shall not glean your vineyard, nor shall you gather every grape of your vineyard. You shall leave them for the poor and the stranger; I am Yahweh your Father. You shall not steal, nor deal falsely, nor lie one to another. Do not vow falsely with My Name, and so profane the Name of your Father. I am Yahweh. You shall not defraud your neighbor, nor rob him. Do not hold back the wages of a hired man overnight. Do not curse the deaf or put a stumblingblock in front of the blind; but reverence your Father. I am Yahweh. Do not pervert judgment: You shall not show partiality to the poor, nor honor to the person of the great. In righteousness you shall judge your neighbor fairly. You shall not go about tale-bearing or slandering among your people. Do not do anything that endangers your neighbor's life. I am Yahweh. You shall not hate your neighbor in your heart. Rebuke your brother or your sister frankly, so you will not share in his or her guilt. Do not seek revenge nor bear a grudge against one of your own people; but you shall love your neighbor; whether a brother or an enemy, as yourself. I am Yahweh."