It is evident that Paul means the moral code of ten commandments, when he speaks of the law, from the following facts:
1. He quotes from the tenth commandment: Exodus 20:17 You shall not covet.
2. The epistle to the Romans was written 60 AD, about twenty nine years after “the hand-writing of ordinances” was nailed to the cross.
And even Paul’s conversion was several years after the abolition of the Jewish system of worship; therefore the law, which was an important agent in his conversion, must refer to the moral code of which Christ says, Matthew 5:18 Till heaven and earth pass, one jot or one tittle shall in no wise pass from the law.
What the Apostle here affirms of himself, is most certainly true in the case of every sinner. Romans 3:20 By the law is the knowledge of sin.
Here we see that one use of the law of God, in the Christian dispensation, is to show sinners the nature and extent of their sins. Romans 7:8 But sin taking occasion by the commandment, wrought in me all manner of concupiscence. For without the law sin was dead.
The moral law is God’s great mirror, into which the sinner may look and see the imperfections of his moral character. Without it, sin is dead, or undiscovered. The apostle James illustrates the use of the royal law by a looking-glass.
For if any be a hearer of the word, and not a doer, he is like unto a man beholding his natural face in a glass: For he beholds himself, and goes his way, and straightway for gets what manner of man he was. But whoso looks into the perfect law of liberty, and continues therein, he being not a forgetful hearer, but a doer of the work, this man shall be blessed in his deed. James 1:23,24"
James White