Or is He the God of the Jews only? Is He not also the God of the Gentiles? Yes, of the Gentiles also, since there is one God who will justify the circumcised by faith and the uncircumcised through faith. Do we then make void the law through faith? Certainly not! On the contrary, we establish the law. (Romans 3:29-31)
At the end of his commentary on Romans 3, Jim McGuiggan shared some thoughts about legalism that I think will be helpful to us.
Sometimes those who put forth great effort to obey what God has said - and encourage others to do the same - are called “legalists.” But is obedience the same thing as legalism?
“Legalism” is not to be understood as obedience. A “legalist” isn’t someone who insists on our keeping God’s commandments. A legalist is one who claims to satisfy God’s demands of holiness by his own holiness. A legalist is one who offers less than what the law demands (flawlessness) and he feels justified on the ground of his moral goodness. - McGuiggan, Romans, 135
Legalism, then, is striving to live a “good” life and believing God will save you on the basis of what you have determined to be a “good” life.
The legalist believes that their personal best is enough to satisfy God.
The legalist said to the law: “Here take the best I can offer you and that will satisfy you. On that basis I will be acquitted.” But this was an insult to the law’s holy demands. The believer said to the law: “I’m sorry, the best that I can offer of myself isn’t nearly enough to satisfy your righteous and holy demands. I must call in a substitute; Jesus Christ.” - McGuiggan, Romans, 135
Legalism exalts self, which results in minimizing Jesus Christ. Legalism also has a fundamental misunderstanding of the seriousness of sin.
McGuiggan concluded by offering a warning to Christians.
So, loved one, beware of the self-righteousness which can creep into the heart as we gain strength in Christ Jesus. Beware of any preaching which removes from the center of justification the once-for-all work of the Master. Beware of any teaching which puts you in the position of “savior.” The Jews had their suppers and seminars, their church-going and their devotionals. Obedience must never be offered as the ground of justification - Christ’s sacrifice is that! - McGuiggan, Romans, 136
Christians, the ground of our justification is Jesus’ death. Obedience is the appropriate response to Jesus’ death - if we love Him, we will obey Him (John 14:15). But may we never mistake our obedience as the grounds for our justification.
Here is an additional resource if you would like to think about this question a little more.