Matthew 7:21 is revealed by JESUS in John 6:28 Then they inquired, What must we do to perform the works of God? 29 Jesus replied, This is the work of God: to believe in the One He has sent.
Does Satan believe in Jesus? He is intimately acquainted with Him yet that alone does not save him. He does not do the works of God nor obey Him.
Belief includes repentance:
Luk 13:3 I tell you, no; but unless you repent you will all likewise perish.
Act 2:37 Now when they heard this, they were cut to the heart, and said to Peter and the rest of the apostles, "Men and brethren, what shall we do?"
Act 2:38 Then Peter said to them, "Repent, and let every one of you be baptized in the name of Jesus Christ for the remission of sins; and you shall receive the gift of the Holy Spirit.
Repent of what? Sin:
2Co_12:21 lest, when I come again, my God will humble me among you, and I shall mourn for many who have sinned before and have not repented of the uncleanness, fornication, and lewdness which they have practiced.
Repentance of sin, genuine repentance, is absolutely required in order to belief AND be saved.
Mere belief without repentance is empty. It's meaningless. When we don't repent of sin we're practicing lawlessness, iniquity. Repentance includes obedience to the law of God. Not obeying the law of God is lawlessness.
Mat_7:23 And then I will declare to them, 'I never knew you; depart from Me, you who practice lawlessness!'