Question: "Does Matthew 7:21-23 mean that believers can lose salvation?"
Answer: The two questions most frequently asked about Matthew 7:21-23 come about because the verses seem to contradict two strongly held beliefs—one cannot lose his salvation and anyone who performs miracles must be from God. As we will see, one of these beliefs is based on scriptural truth and the other is not. While the true believer cannot lose his salvation, not all miracles are performed by true believers.
Jesus is speaking here near the end of His Sermon on the Mount (chapters 5–7). Beginning in verse 13, Jesus discourses at length on the subject of true faith vs. false professions, using the technique of contrast and comparison. Verses 13-14 describe two paths on which people walk through life, the broad road that leads to eternal destruction and the narrow path that leads to eternal life. He introduces here the concept of the “many” and the “few” that He will return to in verses 21-23.
In verses 15-18, He again contrasts the two types of people by using imagery well known to those in an agrarian culture—sheep and wolves, grapes/figs and thorn bushes/thistles, good trees and bad trees, good fruit and bad fruit. Having established the idea of dichotomy in the minds of His hearers, He goes on to apply these truths to the spiritual state of all within His hearing. Jesus presents the two types of people who will come to Him on “that day,” meaning the last day, the day of judgment, the great day fixed by God and unknown to angels and men which will be terrible to some and joyful to others. All will be seeking to enter the kingdom of heaven, but some will be turned away and will react in utter confusion and disappointment as what they thought was their “ticket” to heaven turns out to be worthless. These are those who prophesied in the name of Jesus, meaning either foretelling things to come or preaching the Word in His name. They have even performed miraculous acts such as driving out demons and perhaps healings and other miracles, but all to no avail. But their works were done for their own glory, not His, and were nothing more than “filthy rags” (Isaiah 64:6). In contrast, those who will enter heaven will not do so based on their miraculous achievements and accomplishments or works of any sort, but solely on the basis of obedience to the will of God.
But who are these unfortunate people and how can they do miracles unless they are doing them by God’s power? We know several things about them from the text. First, we know there are many of them, because it is many who are on the broad road to eternal death, as compared to the relative few who have found the narrow path to eternal life. Second, they claim the name of Christ. These are not Muslims, Buddhists, or atheists. These are those who would gladly say, “I am a Christian.” They work their works in Jesus’ name. They pray and heal in Jesus’ name. They preach and teach in Jesus’ name. They build huge churches and ministries in Jesus’ name. They claim a relationship with Him. But they are none of His. In fact, He sends them away, not with commendation for their good works in His name (and many good works are done in Jesus’ name by false professors), but by disowning their every deed and word. He “never” knew them, nor did they ever truly know Him. They weren’t Christians who lost their salvation. They were never part of the elect of God, chosen before the foundation of the world (Ephesians 1:4), set apart and sanctified by the Spirit (1 Corinthians 6:11; 2 Timothy 2:21), and justified by faith (Ephesians 2:8-9). The ones Christ puts away from Himself with harsh words of condemnation, calling them doers of evil, never came to Him in faith, despite their outward good works and miracles.
Then if these do not belong to God and never did, how do we explain their ability to perform miracles? Can those who do not have the Spirit actually cast out demons and perform miraculous healings and spectacular signs and wonders? There are two possible explanations for the ability of the ungodly to perform such acts. One is that some miracles are done by the power of Satan and his demonic host. They are incredibly powerful beings who can manipulate physical elements to their own ends. Consider the power God allowed Satan to use to afflict Job—lightning, wind (possibly a tornado), and boils all over his body (Job 1:16, 19, 2:7). These are certainly miraculous events. Exodus 7 describes the magicians and sorcerers of Egypt whose “secret arts” impressed many, but clearly these were not men of God. In the New Testament, Paul confronted Elymas the Jewish sorcerer and false prophet, calling him a child of the devil, full of all kinds of deceit and trickery (Acts 13:6-11). So we see that not all miracles come from God and not all who perform miracles in the name of Jesus are truly His. He calls them evildoers because the miracles they perform have evil as their source. In fact, Jesus warned us to be on guard against their deception as the end times draw near (Matthew 24:24).
Second, there are times when God, in His sovereign will and for His purposes, will empower unbelievers to perform miraculous deeds. The prime example is Judas who, along with the other disciples, preached the gospel, healed the sick, cast out demons, cleansed lepers, and even raised the dead. There is nothing to indicate that Judas didn’t have the same power as the other eleven, although he was never a true disciple of Christ. He was a deceiver and the “son of perdition” (John 17:12). Yet God gave him the power to do miracles for His own glory and to accomplish His will.
Jesus goes on to describe those who will be able to call upon His name on the day of judgment. It will be those who hear His words and put them into practice, the same ones referred to in verse 21 as those who obediently do the will of the Father in heaven. True believers are the good trees that produce good fruit (Galatians 5:22-23), the true sheep who look to Christ, depend on Him, commit themselves to Him, trust in Him, and believe on Him for righteousness, salvation, and eternal life. These are the ones who will enter into the kingdom of heaven.