Can a sinner be justified in the sight of a holy God by works, or by obedience to God’s commandments? No, of course not. In Galatians 2:16 the Apostle Paul plainly states as much:
“yet we know that a person is not justified by works of the law but through faith in Jesus Christ, so we also have believed in Christ Jesus, in order to be justified by faith in Christ and not by works of the law, because by works of the law no one will be justified.” (ESV)
Notice that Paul basically states this same truth at least three (3) times in just this one simple verse. (It’s as if he is trying to emphasize his point!) No one will be justified by the works of the law. No one.
Having established that, we must be careful to maintain that although we are not in any way justified by works or by obedience to God’s commandments, yet this does not therefore mean that we as believers in Christ have no more need or use for God’s law. Quite the opposite! In his book, Holiness, J.C. Ryle writes,
“There is no greater mistake than to suppose that a Christian has nothing to do with the law and the Ten Commandments, because he cannot be justified by keeping them. The same Holy Ghost who convinces the believer of sin by the law, and leads him to Christ for justification, will always lead him to a spiritual use of the law, as a friendly guide, in the pursuit of sanctification.” (p.26)
As Ryle rightly points out, the Holy Spirit not only uses the law of God to convince or convict the believer of his or her sin, and so to drive them to look to Christ by faith for salvation from sin (often referred to as the pedagogical use of the law), but after conversion also leads that same believer to what Ryle calls a “spiritual use of the law.” What is that “spiritual use” of God’s law? It is to use it as the believer’s rule for life (often called the normative or 3rd use of the law).
To the believer who has been justified by faith alone in Christ alone, the law no longer holds forth the threat of condemnation for sin, but now serves as (to use Ryle’s words) a “friendly guide” in our lifelong pursuit of sanctification.