The law of Christ is a law of liberty, a law of freedom made operative through the Spirit of God within us.
Nothing in our sin nature could produce a godly life. Indeed, it is opposed to righteousness. It is void of all power to do what pleases God.
Though we may know what the right standard of righteousness is because we have God's Law, we do not have in ourselves the ability to meet the Law's righteous demands. All the Law can do under such circumstances is to demand death as a penalty.
But since Jesus Christ paid the death penalty the Law required and has provided life and liberty, we are free to let Christ live His life in us. This is done through the working of the Holy Spirit.
Paul wrote in Romans 8:2: "For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death."
The word "law" does not refer to Old Testament Law but to a principle, a new method God has provided whereby the Holy Spirit produces the life of Christ in us. This is referred to in the Bible as the law of Christ (Gal. 6:2; 1 Cor. 9:21).
The Mosaic Law did not provide freedom from sin for us, nor could it produce righteousness in us because we were spiritually incapable of obeying it.
God, however, sent His own Son "in the likeness of sinful flesh, and for sin, condemned sin in the flesh" (Rom. 8:3). Christ judged, or dethroned, the power of sin and set us free so that it is possible for us to please God with lives of righteousness.
"For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death" (Rom. 8:2).