James mentions "law" ten times in his epistle, and in each case it is the moral law. He has nothing but good to say about it. James, taught by Christ, exalts the law—he glorifies it, identifying it with the gospel.
In James 1, when speaking of the Word and the importance of hearing and doing it, he, in the same breath, speaks of looking into "the perfect law of liberty." James looks at the law as explained in the gospel—the gospel shows the law in its spirituality—as the guide of the true Christian who has entered into the spirit of the law or is keeping the spirit of the law as well as the letter.
Even in the Old Testament, as Psalms 19 and 119 specifically show, it was possible for spiritually-minded people to see the beauty of the law and find delight in its precepts.
Martin G. Collins
The Law's Purpose and Intent
What is the law of liberty? Specifically, it is the Ten Commandments, but we can consider it broadly as the law of God. Israel had the benefit of the law of liberty, though they did not use it rightly.
John W. Ritenbaugh
The Covenants, Grace, and Law (Part 23)
In essence, James describes a person who sees the truth from God's Word and responds by using it. He sees himself as an instrument of God to be used, even spent, in service to Him and His people. He holds the feelings and well being of others to be as important as his own. Unlike the myopic person, he sees beyond his comfort zone, following the example of Jesus Christ.
Only by careful study of God's Word, the ultimate standard of thought, speech, and conduct, can we know what is right and wrong. We must follow our study with honest and truthful comparison of those words with our own lives. If we read the words of God and walk away, forgetting what we saw, we deceive ourselves. None of us compares favorably with what we read in Scripture, so we must make changes. James says our religion—our practice of God's way of life—is vain if we omit either the positive instructions (visiting widows and orphans) or the negative ones (removing the spots from our character).
Overcoming (Part 1): Self-Deception
Other Forerunner Commentary entries containing James 1:25: