Deu 9:4-6 “Do not say in your heart, after the LORD your God has thrust them out before you, ‘It is because of my righteousness that the LORD has brought me in to possess this land,’ whereas it is because of the wickedness of these nations that the LORD is driving them out before you. Not because of your righteousness or the uprightness of your heart are you going in to possess their land, but because of the wickedness of these nations the LORD your God is driving them out from before you, and that he may confirm the word that the LORD swore to your fathers, to Abraham, to Isaac, and to Jacob. “Know, therefore, that the LORD your God is not giving you this good land to possess because of your righteousness, for you are a stubborn people.
Leviticus 18:3. So do not act like the people in Egypt, where you used to live, or like the people of Canaan, where I am taking you. You must not imitate their way of life.
Romans 3:27 Then what becomes of our boasting? It is excluded. By what kind of law? By a law of works? No, but by the law of faith.
Speak not thou in thine heart,…. Never once think within thyself, or give way to such a vain imagination, and please thyself with it: after that the Lord thy God hath cast them out from before thee; to make way for the Israelites, and put them into the possession of their land; which is to be ascribed not to them, but to the Lord: saying, for my righteousness the Lord hath brought me in to possess this land; such a thought as this was not to be secretly cherished in their hearts, and much less expressed with their lips; nothing being more foreign from truth than this, and yet a notion they were prone to entertain. They were always a people, more or less, from first to last, tainted with a conceit of their own righteousness, and goodness, which they laboured to establish, and were ready to attribute all the good things to it they enjoyed, and nothing is more natural to men, than to fancy they shall be brought to the heavenly Canaan by and for their own righteousness; which is contrary to the perfections of God, his purity, holiness, and justice, which can never admit of an imperfect righteousness in the room of a perfect one; to justify anyone thereby, is contrary to the Gospel scheme of salvation; which is not by works of righteousness men have done, but by the grace and mercy of God through Christ; it would make useless, null, and void, the righteousness of Christ, which only can justify men in the sight of God, give a title to heaven and happiness, and an abundant entrance into it; and would occasion boasting, not only in the present state, but even in heaven itself; whereas the scheme of salvation is so framed and fixed, that there may be no room for boasting, here or hereafter, but for the wickedness of these nations the Lord doth drive them out from before thee; namely, their idolatry, incest, and other notorious crimes; which sufficiently justifies God in all his dealings with these nations. (Gill)
When therefore Jehovah thrust out these nations before them, the Israelites were not to say within themselves, “By (for, on account of) my righteousness Jehovah hath brought me (led me hither) to possess this land” – “but because of the wickedness of these nations,” etc. – To impress this truth deeply upon the people, Moses repeats the thought once more. At the same time he mentions, in addition to righteousness, straightness or uprightness of heart, to indicate briefly that outward works do not constitute true righteousness, but that an upright state of heart is indispensable, and then enters more fully into the positive reasons. The wickedness of the Canaanites was no doubt a sufficient reason for destroying them, but not for giving their land to the people of Israel, since they could lay no claim to it on account of their own righteousness. The reason for giving Canaan to the Israelites was simply the promise of God, the word which the Lord had spoken to the patriarchs on oath and therefore nothing but the free grace of God, – not any merit on the part of the Israelites who were then living, for they were a people “of a hard neck,” i.e., a stubborn, untractable generation. With these words, which the Lord Himself had applied to Israel. Moses prepares the way for passing to the reasons for his warning against self-righteous pride, namely, the grievous sins of the Israelites against the Lord. (Keil)
We will never find joy, satisfaction, or heavenly peace when we look to our “Good Works” as a means or reason for Eternal life, Forgiveness, Blessings, or being made right in the eyes of God. Our “Good Works” are only good when done for the sole purpose of honoring and glorifying Jesus Christ. When we live close to sin and entertain and tolerate it in our lives, when we neglect God’s Word and become complacent in our thinking about sin, and when we do not seek and desire to know more and more of God and His grace, mercy, and love, our thinking becomes like that of a dull foolish child. We go about our lives day after day in a state of self-acceptance and self-reliance and the sinfulness of our sin and the holiness of God escape our minds. There is no growth in this understanding when the Word of God is neglected or not studied with the intent of knowing and understanding God and the things of God. I fear that far too often the Word of God is neglected and in its place is what the world tolerates and accepts. How is the Holy Spirit to speak into our lives and lead, convict, encourage, give us peace, and grow our understanding when our hearts and minds are not purposed to honor and glorify Jesus Christ?