Deuteronomy 18:20

20 But a prophet who presumes to speak in my name anything I have not commanded, or a prophet who speaks in the name of other gods, is to be put to death.”

Read Deuteronomy 18:20 Using Other Translations

But the prophet, which shall presume to speak a word in my name, which I have not commanded him to speak, or that shall speak in the name of other gods, even that prophet shall die.
But the prophet who presumes to speak a word in my name that I have not commanded him to speak, or who speaks in the name of other gods, that same prophet shall die.'
But any prophet who falsely claims to speak in my name or who speaks in the name of another god must die.’

What does Deuteronomy 18:20 mean?

John Gill's Exposition of the Bible
Deuteronomy 18:20

But the prophet which shall presume to speak in my name
Pretending a mission and commission from God, and yet was never sent by him, like the prophets in ( Jeremiah 23:21 ) ,

which I have not commanded him to speak;
which though true was not to be spoken in a public manner, by assuming a public office, without a divine authority or a commission from God, and much less what was false, and never commanded to be spoken at all by any:

or, that shall speak in the name of other gods;
the idols of the people, as the Targum; as if any should affirm they were sent by Jove, or inspired by Apollo, as some are said to prophesy by Baal, as if they had received their orders and instructions from him, and were inspired by him, ( Jeremiah 2:8 )

even that prophet shall die;
the Targum of Jonathan is, be killed by the sword, but the Jews F17 generally interpret it of strangling.


FOOTNOTES:

F17 Misn. Sanhedrin, c. 10. sect. 1. Bartenora in ib sect. 5. and Jarchi in loc.
California - Do Not Sell My Personal Information  California - CCPA Notice