Ex. 20:7 in the ASV says:
"Thou shalt not take the name of Jehovah thy God in vain; for Jehovah will not hold him guiltless that taketh his name in vain."
Note how other translations render the same verse:
"Do not use my name for evil purposes..." (Good News Translation)
"Never use the name of the LORD your God carelessly..." (God's Word Translation)
""You are not to use lightly the name..." (Complete Jewish Bible)
"You are not to make use of the name...for an evil purpose..." (Bible in Basic English)
“You must not take up the name of Jehovah your God in a worthless way..." (NWT)
------------------------------------------------
The context of this Scripture additionally aids to understanding the intended meaning.
God’s name Jehovah was made known in a special way when he delivered the Israelites from Egypt as his chosen nation. He put His name on that people and gave them His law: “And now if you will strictly obey my voice and will indeed keep my covenant, then you will certainly become my special property out of all other peoples, because the whole earth belongs to me. And you yourselves will become to me a kingdom of priests and a holy nation.” (Ex. 19:5, 6) The Israelites agreed to obey and be Jehovah’s special property with his name on them. They were warned: “You must not take up the name of Jehovah your God in a worthless way, for Jehovah will not leave the one unpunished who takes up his name in a worthless way.” (Ex. 20:7) NWT
So when this third one of the Ten Commandments says not to take God’s name in vain or in a worthless way, it means much more than not using his name in profanity. It means that those who agree to be God’s people bear his name and must obey the laws and commands and principles his name stands for; otherwise they are taking his name in a worthless way and will not go unpunished.
This law forbids the misuse of God’s name. But it does not forbid the respectful use of his name.
There is nothing in the Scriptures that says that this name should not be used. God said not to take His name “in vain,” or “in a worthless way.” But that does not mean that we should not use the name. Rather, it means that servants of Jehovah should not do things that discredit his name. God’s decree against the improper use of his name was twisted into a superstition.
A significant example of taking God’s name in a worthless way is that of the mighty Egyptian Pharaoh. Sneeringly he replied to Moses and Aaron, who appeared before him in God’s name: “Who is Jehovah, so that I should obey his voice . . . ? I do not know Jehovah at all.” His words and actions declared his utter disrespect for Jehovah God and his glorious name. (Ex. 5:2)
For more, see:
God's Name - Links to Information (Defend Jehovah's Witnesses)
“You must not take up the name of Jehovah your God in a worthless way.” (Ex 20:7) (Insight-2 pp. 1085-1087; Watchtower Online Library)
The Third Commandment (g04 1/22 pp. 5-9; Watchtower Online Library)
The Encyclopaedia Judaica says that “the avoidance of pronouncing the name YHWH . . . was caused by a misunderstanding of the Third Commandment.” Hence, God’s decree against the improper use of his name was twisted into a superstition.
“To avoid the risk of taking God’s name (YHWH) in vain, devout Jews began to substitute the word ʼǎdōnā(y) for the proper name itself." (Rbi8 pp. 1561-1562 1A The Divine Name in the Hebrew Scriptures; Watchtower Online Library)
What does it mean to "take the lord's name in vain"? (Jehovah's Witnesses Questions and Answers)
How Important is God's Name? (Search For Bible Truths)