2 Peter 2:21

For it would be better for them not to have known the way of righteousness, than, after knowing it, to turn back from the holy commandment delivered to them.

Ezekiel 18:24

But when the righteous turns away from his righteousness, and commits iniquity, and does according to all the abominations that the wicked man does, shall he live? None of his righteous deeds that he has done shall be remembered: in his trespass that he has trespassed, and in his sin that he has sinned, in them shall he die.

Luke 12:47

That servant, who knew his lord's will, and didn't prepare, nor do what he wanted, will be beaten with many stripes,

Romans 7:12

Therefore the law indeed is holy, and the commandment holy, and righteous, and good.

Hebrews 6:4-6

For concerning those who were once enlightened and tasted of the heavenly gift, and were made partakers of the Holy Spirit,

Psalm 36:3-4

The words of his mouth are iniquity and deceit. He has ceased to be wise and to do good.

Psalm 125:5

But as for those who turn aside to their crooked ways, Yahweh will lead them away with the workers of iniquity. Peace be on Israel. A Song of Ascents.

Proverbs 12:28

In the way of righteousness is life; in its path there is no death.

Proverbs 16:31

Gray hair is a crown of glory. It is attained by a life of righteousness.

Ezekiel 3:20

Again, when a righteous man does turn from his righteousness, and commit iniquity, and I lay a stumbling block before him, he shall die: because you have not given him warning, he shall die in his sin, and his righteous deeds which he has done shall not be remembered; but his blood will I require at your hand.

Ezekiel 23:13

I saw that she was defiled; they both took one way.

Zephaniah 1:6

those who have turned back from following Yahweh, and those who haven't sought Yahweh nor inquired after him.

Matthew 11:23-24

You, Capernaum, who are exalted to heaven, you will go down to Hades. For if the mighty works had been done in Sodom which were done in you, it would have remained until this day.

Matthew 21:32

For John came to you in the way of righteousness, and you didn't believe him, but the tax collectors and the prostitutes believed him. When you saw it, you didn't even repent afterward, that you might believe him.

John 9:41

Jesus said to them, "If you were blind, you would have no sin; but now you say, 'We see.' Therefore your sin remains.

John 15:22

If I had not come and spoken to them, they would not have had sin; but now they have no excuse for their sin.

1 Thessalonians 4:2

For you know what instructions we gave you through the Lord Jesus.

James 4:17

To him therefore who knows to do good, and doesn't do it, to him it is sin.

Treasury of Scripture Knowledge

Summary

For it had been better for them not to have known the way of righteousness, than, after they have known it, to turn from the holy commandment delivered unto them.

Bible References

It had

Matthew 11:23
You, Capernaum, who are exalted to heaven, you will go down to Hades. For if the mighty works had been done in Sodom which were done in you, it would have remained until this day.
Luke 12:47
That servant, who knew his lord's will, and didn't prepare, nor do what he wanted, will be beaten with many stripes,
John 9:41
Jesus said to them, "If you were blind, you would have no sin; but now you say, 'We see.' Therefore your sin remains.
John 15:22
If I had not come and spoken to them, they would not have had sin; but now they have no excuse for their sin.

The way

Proverbs 12:28
In the way of righteousness is life; in its path there is no death.
Proverbs 16:31
Gray hair is a crown of glory. It is attained by a life of righteousness.
Matthew 21:32
For John came to you in the way of righteousness, and you didn't believe him, but the tax collectors and the prostitutes believed him. When you saw it, you didn't even repent afterward, that you might believe him.

To turn

Psalm 36:3
The words of his mouth are iniquity and deceit. He has ceased to be wise and to do good.
Psalm 125:5
But as for those who turn aside to their crooked ways, Yahweh will lead them away with the workers of iniquity. Peace be on Israel. A Song of Ascents.
Ezekiel 3:20
Again, when a righteous man does turn from his righteousness, and commit iniquity, and I lay a stumbling block before him, he shall die: because you have not given him warning, he shall die in his sin, and his righteous deeds which he has done shall not be remembered; but his blood will I require at your hand.
Ezekiel 18:24
But when the righteous turns away from his righteousness, and commits iniquity, and does according to all the abominations that the wicked man does, shall he live? None of his righteous deeds that he has done shall be remembered: in his trespass that he has trespassed, and in his sin that he has sinned, in them shall he die.
Ezekiel 23:13
I saw that she was defiled; they both took one way.
Zephaniah 1:6
those who have turned back from following Yahweh, and those who haven't sought Yahweh nor inquired after him.

Holy

Romans 7:12
Therefore the law indeed is holy, and the commandment holy, and righteous, and good.
1 Thessalonians 4:2
For you know what instructions we gave you through the Lord Jesus.

General references

Genesis 24:6
Abraham said to him, "Beware that you don't bring my son there again.
Numbers 14:4
They said one to another, "Let us make a captain, and let us return into Egypt."
Deuteronomy 14:7
Nevertheless these you shall not eat of them that chew the cud, or of those who have the hoof cloven: the camel, and the hare, and the rabbit; because they chew the cud but don't part the hoof, they are unclean to you.
Jeremiah 34:11
but afterwards they turned, and caused the servants and the handmaids, whom they had let go free, to return, and brought them into subjection for servants and for handmaids.
Ezekiel 33:18
When the righteous turns from his righteousness, and commits iniquity, he shall even die therein.
Matthew 7:27
The rain came down, the floods came, and the winds blew, and beat on that house; and it fell -- and great was its fall."
Luke 14:30
saying, 'This man began to build, and wasn't able to finish.'
Luke 17:32
Remember Lot's wife!
1 Timothy 5:15
For already some have turned aside after Satan.