The classic text for this is James 2:14-26, which concludes, “For just as the body apart from the spirit is dead, so also faith without works is dead.” It is often thought that James represents a starkly different approach to the idea of justification from that of Paul, whose rejection of the works of the Law as a source of righteousness before God is well known. However, if you read Paul carefully, you’ll see that he and James are saying virtually the same thing, even if it seems kind of like James is subverting Paul’s language.
Romans 5-8 is where Paul most completely sets out his ideas concerning the importance of our actions and our profession lining up, and Romans 6:15-18 sums it up best:
(15) What then? Are we to sin because we are not under law but under grace? By no means! (16) Do you not know that if you present yourselves to anyone as obedient slaves, you are slaves of the one whom you obey, either of sin, which leads to death, or of obedience, which leads to righteousness [this could also be translated ‘justification’]? (17) But thanks be to God, that you who were once slaves of sin have become obedient from the heart to the standard of teaching to which you were committed, (18) and, having been set free from sin, have become slaves of righteousness.
Paul’s line of thought is this: we are reconciled to God in Jesus, not by our faithfulness, but by the faithfulness of Jesus. Our sins are forgiven because Jesus died for us. That makes us justified. But the point of God’s glorious salvation for us isn’t just that we won’t be condemned, but even more that we will at last be free from the compulsive power of sin (because the basic problem is not condemnation alone but the actual commission of sin). This is sometimes called sanctification, and many Evangelical theologians and pastors deal with these two concepts – justification and sanctification – as if they can have meaning without each other. But this was not the case for Paul or James or John or any of the writers of the New Testament. Justification and sanctification are two sides of the same coin, and the coin is called (in Paul’s terms) reconciliation. Our sins – past, present, and future – are forgiven, so we don’t have to worry about earning anything with God. And through the Holy Spirit he delivers us from the dominance of sin by changing our hearts. We are saved both from the penalty and the dominance of sin. To habitually and willfully sin after professing Christ simply shows that we have not been changed in our hearts, meaning the Holy Spirit has not accomplished its sanctifying work. For Paul and for James, this can only happen if the person has not truly been reconciled with God through Christ. John says something similar in 1 John 1:6:
If we say we have fellowship with him while we walk in darkness, we lie and do not practice the truth.
This is the idea in your original quotation (if I understand it correctly), and it finds support in most if not all the writers of the New Testament, and even in the teachings of Jesus himself. In Matthew 7:22-23, he says:
(22) On that day many will say to me, Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name? (23) And then will I declare to them, I never knew you; depart from me, you workers of lawlessness.
I might also add that the Old Testament supports the idea that God seeks the fruit of righteousness rather than empty profession. In just one among many passages, 1 Samuel 15:22 says:
Has the Lord as great delight in burnt offerings and sacrifices,
as in obeying the voice of the Lord?
Behold, to obey is better than sacrifice,
and to listen than the fat of rams.
It’s not that God is demanding good works or else he is threatening to take away our salvation. Rather, the biblical perspective is that if we are habitually and willfully sinning, we are proving not only that we are not partakers of God’s salvation (which delivers us from sin) but that we don’t want to be partakers.
Now, this does not cover all possible situations. Christians even after a legitimate salvation experience have to deal with the lingering effects of sin, and sometimes for whatever reason God allows us to continue to struggle with some particular compulsion. In cases like these, God says, “My grace is sufficient for you, for my power is made perfect in weakness” (2 Corinthians 12:9). It is not God’s will for you to live in condemnation, and even if deliverance from a compulsive sin is slow in coming, it absolutely is God’s will to deliver you from that compulsion eventually. It’s just that sometimes by forcing us to rely on his grace God can teach us things that we cannot learn from a position of power and victory. God is a big God who is not eager to condemn us (particularly after showing his love for us in that Christ died for us). He is eager to save us – to justify and to sanctify us. If final sanctification is slow in coming, rest in his justification and pray expectantly for the Holy Spirit to change you from the inside.