Sinclair Ferguson in his book The Whole Christ has an extremely useful explanation of “legalism”:
Gerhardus Vos well expresses this in another context:
Legalism is a peculiar kind of submission to God’s law, something that no longer feels the personal divine touch in the rule it submits to.
Legal is simply separating the law of God from the person of God. Eve sees God’s law, but she has lost sight of the true God himself. Thus, abstracting his law form his loving and generous person, she was deceived into “hearing” law only as a negative deprivation and not as the wisdom of a heavenly Father….Thus, the essence of legalism is rooted not merely in our view of the law as such but in a distorted view of God as the giver of his law.
The Whole Christ, p. 83. Now see how this is shown in God’s appearance to Solomon:
1 Kings 9:1–9 (ESV)
9 As soon as Solomon had finished building the house of the Lord and the king’s house and all that Solomon desired to build, 2 the Lord appeared to Solomon a second time, as he had appeared to him at Gibeon. 3 And the Lord said to him, “I have heard your prayer and your plea, which you have made before me. I have consecrated this house that you have built, by putting my name there forever. My eyes and my heart will be there for all time. 4 And as for you, if you will walk before me, as David your father walked, with integrity of heart and uprightness, doing according to all that I have commanded you, and keeping my statutes and my rules, 5 then I will establish your royal throne over Israel forever, as I promised David your father, saying, ‘You shall not lack a man on the throne of Israel.’
This much could be read as a straight “legal” contract: If do X, then I will do Y. A quick reading could lead one to abstract God’s law from God’s person. But we when consider the negative clause in this covenant, we will see something very telling:
6 But if you turn aside from following me, you or your children, and do not keep my commandments and my statutes that I have set before you, but go and serve other gods and worship them, 7 then I will cut off Israel from the land that I have given them, and the house that I have consecrated for my name I will cast out of my sight, and Israel will become a proverb and a byword among all peoples. 8 And this house will become a heap of ruins. Everyone passing by it will be astonished and will hiss, and they will say, ‘Why has the Lord done thus to this land and to this house?’ 9 Then they will say, ‘Because they abandoned the Lord their God who brought their fathers out of the land of Egypt and laid hold on other gods and worshiped them and served them. Therefore the Lord has brought all this disaster on them.’ ”
If you disobey my law, you will necessarily worship other gods. We somehow think that God’s law can be abstracted and separated as just moral commands. Either we can have God without having his law; or we cannot disobey his law and yet not be following after other gods. The worship of God, the obedience to God, the love of God, all come at once or not at all. This paralleled in the New Testament:
Ephesians 2:8–10 (ESV)
8 For by grace you have been saved through faith. And this is not your own doing; it is the gift of God, 9 not a result of works, so that no one may boast. 10 For we are his workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them.
We are saved by grace without works, so that we may live in a particular manner. We are not saved by good works; we saved by being in Christ. But, being in Christ necessitates good works, just as living necessitates breathing:
John 15:10 (ESV)
10 If you keep my commandments, you will abide in my love, just as I have kept my Father’s commandments and abide in his love.