But whoso looketh into the perfect law of liberty, and continueth [therein], he being not a forgetful hearer, but a doer of the work, this man shall be blessed in his deed.
The explanation of the text is shown here. If we look into the perfect law of liberty and follow it and do it we will be blessed. The opposite seems to be assumed, that if you don't follow it you won't be blessed.
Much has been said as to the meaning of "perfect law of liberty" but I'm not sure that is the point. The point is that we are to look into the Word and do it if we would be blessed.
It is obvious in the context that the law of liberty relates in some way to the Word itself. Verse twenty-two sets the context as the Word. I suspect that James is using a flourish of words to embellish his idea of the Word as introduced in the preceding context but let's look into it to be sure.
Perfect is the word that relates to completeness and readiness to do the job. A Drag racing car that pulls up to the starting line has been gone over, it has been tuned, it has been babied and it is complete and ready for that blast down the track. This is the thought of "perfect."
"Liberty" simply has the idea that we are free to do or not do. The authority has given us the choice to do what we want to do. The law of liberty speaks of set standards that are placed to insure freedom to act as we will and that is just what has been set forth. Anyone that looks into the Word is free to do as he or she will, but know there is consequence to both the positive and the negative.
Barnes said that this was the law of God in the thought that it is His will. It is the overall will of God for mankind. Constable relates it to the revealed Word of God, which is the will of God. I won't attempt to describe the twisting and twirling of Gill in his attempt to define the law of liberty, but I think somewhere in there He would agree with what has been presented - the revealed will of God in the Word. I will include it if you would like to read it.
"But whoso looketh into the perfect law of liberty,.... By which is meant, not the moral law, but the Gospel; for only of that is the apostle speaking in the context: this is no other than the word of truth, with which God begets men of his own will; and is the ingrafted word which is able to save, and of which men should be doers, as well as hearers, James 1:18, and this is compared to a glass by the Apostle Paul, 2 Corinthians 3:18, and the word here used for looking into it is the same word the Apostle Peter uses of the angels, who desired to look into the mysteries of the Gospel, 1 Peter 1:12 all which serve to strengthen this sense; now the Gospel is called a law; not that it is a law, strictly speaking, consisting precepts, and established and enforced by sanctions penalties; for it is a declaration of righteousness and salvation by Christ; a publication of peace and pardon by him; and a free promise of eternal life, through him; but as it is an instruction, or doctrine: the law with the Jews is called hrwt, because it is teaching and instructive; and everything that is so is by them called by this name: hence we find the doctrine of the Messiah, which is no other than the Gospel, is in the Old Testament called the law of the Lord, and his law, Isaiah 2:2 and in the New Testament it is called the law, or doctrine of faith, Romans 3:27 and this doctrine is perfect, as in Psalms 19:7, it being a perfect plan of truths, containing in it all truth, as it is in Jesus, even all the treasures of wisdom and knowledge; and because it is a revelation of things perfect; of the perfect righteousness of Christ, and of perfect justification by it, and of free and full pardon of sins through him, and of complete salvation by him; and because it directs to Christ, in whom perfection is: and it is a law or doctrine of liberty;" There is more, but I think you get the idea.