"There shall be no whore of the daughters of Israel, nor a sodomite of the sons of Israel." (Deuteronomy 23:17, KJV)
The word translated "whore" is the noun "קדשׁה (kedeshah)" and the word translated "sodomite" is the noun "קדשׁ (kadesh)". The first is the female form of the word and the second is the male form of the word. Since the verb form "קדשׁ (kadash)" means "to consecrate, sanctify, prepare, dedicate, be hallowed, be holy, be sanctified, be separate" (Brown-Driver-Briggs' Hebrew Definitions), many scholars suppose that the noun form of both genders refers to a person associated with a cult or temple. The ESV, NASB and HCSB have "cult prostitute". The NIV has "shrine prostitute". The NLT has "temple prostitute". Jeffrey H. Tigay, Emeritus A.M. Ellis Professor of Hebrew and Semitic Languages and Literatures in the Department of Near Eastern Languages and Civilizations at the University of Pennsylvania, disagrees with these modern translations as follows in his commentary on Deuteronomy 23:17:
"cult prostitute Rather, "prostitute." Hebrew kedeshah refers to a common prostitute elsewhere in the Bible, and that is probably its meaning here, synonymous with "whore" in the next verse. This prohibition is similar to Leviticus 19:29, which prohibits a father from degrading his daughter by making her a harlot. There is scant justification for the translation "cult prostitute," a term used by modern scholars for a prostitute employed at a sanctuary. Although kedeshah means something like "holy woman," from the root k-d-sh ("holy," "set apart," "reserved"), etymology is not a reliable indication of meaning; in the present case it could simply be a euphemism like some other terms for prostitute. It is questionable whether cultic prostitution existed at all in the ancient Near East. See Excursus 22.
The meaning of the masculine kadesh here is uncertain. In the book of Kings it refers to a type of abhorrent pagan cultic functionary, mentioned on a par with high places, sacred pillars and sacred posts, and in association with the goddess Asherah. In Ugaritic it refers to cultic personnel lower than priests. There is reason to question whether the word has the same meaning here. A servant of a pagan deity would be banned by the general prohibition of paganism and would not require a separate law (there is no prohibition on kemarim, the other term for pagan priests). Even if it did require a separate law, one would expect a practice involving the worship of another god to be banned absolutely, and the text to say "let no kadesh be found among you" at all (cf. 18:10-11), not "no Israelite shall be a kadesh." It seems, therefore, that the kadesh in this verse is not a pagan official. Since the kedeshah is a prostitute, perhaps the kadesh here is a male prostitute, either heterosexual or homosexual. The term is not known to have this meaning elsewhere, but the order of the clauses in this verse may support this interpretation. Females are not usually listed before males; and perhaps this was done here in order to clarify the theme of the verse and indicate that here kadesh is another type of prostitute and does not have its usual meaning." (The JPS Torah Commentary: Deuteronomy, The Traditional Hebrew Text with the New JPS Translation Commentary by Jeffrey H. Tigay (Philadelphia : Jewish Publication Society, 1996), p. 215-216)
Apart from the kadesh-kadash connection, many scholars believe the people in verse 17 are associated with religious duties because verse 18 appears to prohibit a "secular" form of prostitution. Verse 18 mentions a "whore" and a "dog". The word "whore" in verse 18 is understood to be the word for a secular (i.e. recreational) female "whore" or "harlot" (זנה (zanah), translated as "prostitute" in the ESV, NIV, NLT) and "dog" is understood to be a derogatory term referring to the male equivalent of the secular "whore" or "harlot" (see NET Bible note 27 of Deuteronomy 23:18: "Heb “of a dog.” This is the common Hebrew term for a noncultic (i.e., “secular”) male prostitute."). Given this prohibition against a supposed secular form of prostitution in verse 18, many scholars believe that the prostitution in verse 17 is a different and more specific type of prostitution. However, this theory ignores the fact that Hebrew writing is replete with synonymous parallelisms which repeat what is essentially the same idea in order to emphasize an idea or to define an idea in pairs. The context suggests that "zanah" and "kedeshah/kadesh" are just two words to refer to the same thing - whore/harlot. Consider the parallelism:
"sodomites. This rendering follows the Targum, and the Talmud (Sanh. 54b) explains that the verse refers to male prostitutes. This was common among the heathens, but is denounced as abominable in Lev. xviii. 22 and prohibited in Deut. xxiii. 18f." (Kings, The Soncino Books of the Bible: Hebrew Text & English Translation with an Introduction and Commentary, edited by Rabbi Abraham Cohen, by Rev. Dr. I. W. Slotki, and revised by Rabbi E. Oratz (New York : Soncino Press, 1990), p. 108).
While Tigay refutes the modern translation of "cult prostitute", he does not exactly support the KJV translation of "sodomite". He provides a theory suggesting male prostitute but ultimately says "The meaning of the masculine kadesh here is uncertain." As explained in another Jewish translation of Deuteronomy 23:17 and commentary, it may not be necessary to narrow the meaning of kadesh to prostitution. The word signifies a person who is sexually immoral in a general sense:
"There shall be no one dedicated to immorality of the daughters of Israel, and no one dedicated to immorality of the sons of Israel....
...Just as קדוש is the complete surrender to what is morally lofty and good so is קדש the surrender to what is morally low and bad. An analogy can be found in the root כבר, which as כבור designates the impression of the spiritual moral content, and as כבר the impression of the material content. Immorality is every sexual intercourse which has not had the dedication of קידושין [sanctification]...."
(The Pentateuch: Translated & Explained, Samson Raphael Hirsch, Vol. V Deuteronomy, rendered into English by Isaac Levy, 2nd Edition (New York : Bloch Publishing Company, 1966), p. 465)
Likewise, the Stone Edition Tanach, by the respected Mesorah Heritage Foundation, edited by Rabbi Nosson Scherman and other Rabbis, translates Deuteronomy 23:17 (verse 18 in the Hebrew) as:
"There shall not be a promiscuous woman among the daughters of Israel, and there shall not be a promiscuous man among the sons of Israel."
If promiscuity is what is suggested by kadesh, then verse 17 prohibits promiscuity and verse 18 prohibits bringing in the proceeds of commercial promiscuity (i.e. prostitution) into the house of the LORD. The synonymous parallelism of verses 17 and 18 still makes sense.
As for why the KJV uses the term "sodomite" to translate kadesh, the KJV translators appeared to follow Rashi's commentary which runs alongside the Masoretic text of the Hebrew Bible. Rashi explains the text as follows:
"ולא יהיה קדש: מזומן למשכב זכר"
"nor shall there be kadesh: one prepared to lie with a male" (Translation by KJV Today)
The Pentateuch and Rashi's Commentary: A Linear Translation into English (Rabbi Abraham Ben Isaiah & Rabbi Benjamin Sharfman (New York : S.S.& R. Publishing Company, 1977), p. 211) translates Rashi's "למשכב זכר" as "pederasty", which refers to sexual acts between an adult male and a young male:
The Complete Jewish Bible with Rashi's Commentary, a free online resource at http://www.chabad.org/library/bible_cdo/aid/63255/jewish/The-Bible-with-Rashi.htm translates Rashi's commentary at Deuteronomy 23:17 as "one [i.e., a male] ready for homosexual relations". The context of Deuteronomy 23:17 also supports the association of kadesh with sex between males. Though crude an image, the reference to "dog" in verse 18 which corresponds to "sodomite" in the synonymous parallelism suggests sexual intercourse resembling that which is performed by dogs.
As the term "homosexual" was introduced into the English language as late as 1892 (Online Etymology Dictionary: homosexual (adj.)), the word used by the KJV translators in 1611 was "sodomite". The meaning of "sodomy" is derived as follows according to the Online Etymology Dictionary entry on "sodomy (n.):
c.1300, "unnatural sexual relations," such as those imputed to the inhabitants of Biblical Sodom, especially between persons of the same sex but also with beasts, from Old French sodomie, from Late Latin peccatum Sodomiticum "anal sex," literally "the sin of Sodom," from Latin Sodoma. In Middle English also synne Sodomyke (early 14c.).
Although the etymology of "sodomy" originated in medieval times, the identification of Sodom with "unnatural sexual relations" originated in Jude 1:6-7:
6 And the angels which kept not their first estate, but left their own habitation, he hath reserved in everlasting chains under darkness unto the judgment of the great day. 7 Even as Sodom and Gomorrha, and the cities about them in like manner, giving themselves over to fornication, and going after strange flesh, are set forth for an example, suffering the vengeance of eternal fire.
While "sodomy" carries a strong connotation of sexual acts between persons of the same sex, the meaning is not restricted to only this type of sexual act. As defined in Noah Webster's 1828 English Dictionary, "SOD'OMY, noun [is] A crime against nature." The broadness of the term served as a blanket condemnation of all types of sexual behaviors performed outside the scope of procreation between a man and a woman. However, the word signifies what was considered the most unnatural of all these prohibited sexual behaviors, such as that demonstrated by the men of Sodom in Genesis 19 whose sexual behavior was devoid of any natural affection or commitment. Webster's reference to that which is against "nature" echoes the natural law theory of sexuality, which Thomas Aquinas explained as follows in Contra Gentiles, Book III, Part II, Chapter 122 (translated by Vernon J. Bourke):
 Again, we must consider that in the human species offspring require not only nourishment for the body, as in the case of other animals, but also education for the soul. For other animals naturally possess their own kinds of prudence whereby they are enabled to take care of themselves. But a man lives by reason, which he must develop by lengthy temporal experience so that he may achieve prudence. Hence, children must be instructed by parents who are already experienced people. Nor are they able to receive such instruction as soon as they are born, but after a long time, and especially after they have reached the age of discretion. Moreover, a long time is needed for this instruction. Then, too, because of the impulsion of the passions, through which prudent judgment is vitiated, they require not merely instruction but correction. Now, a woman alone is not adequate to this task; rather, this demands the work of a husband, in whom reason is more developed for giving instruction and strength is more available for giving punishment. Therefore, in the human species, it is not enough, as in the case of birds, to devote a small amount of time to bringing up offspring, for a long period of life is required. Hence, since among all animals it is necessary for male and female to remain together as long as the work of the father is needed by the offspring, it is natural to the human being for the man to establish a lasting association with a designated woman, over no short period of time. Now, we call this society matrimony. Therefore, matrimony is natural for man, and promiscuous performance of the sexual act, outside matrimony, is contrary to man’s good. For this reason, it must be a sin.
Therefore, the KJV's use of "sodomite", though appearing to follow Rashi's narrow interpretation of a male lying with another male, allows for the broader meaning of a male involved in unnatural sexual acts outside the scope of procreation. This would certainly include cult prostitution, secular prostitution, sex between males, and general sexual immorality and promiscuity. The word "sodomite", having a broad meaning in early modern English, is consistent with all known theories of the meaning of kadesh and carries the full force and meaning of the Hebrew word. The synonymous parallelism makes sense with verse 17 prohibiting sodomy and verse 18 prohibiting bringing the avails of commercial sodomy (i.e. "the price of a dog", i.e. the avails of male prostitution) into the house of the LORD. The KJV translates kadesh as "sodomite[s]" on five other occasions in 1 Kings 14:24, 1 Kings 15:12, 1 Kings 22:46, 2 Kings 23:7. 1 Kings 14:24 says "there were also sodomites in the land: and they did according to all the abominations of the nations which the LORD cast out before the children of Israel." This further demonstrates that "sodomites" refers to people engaged in all sorts of perversions and not just to people guilty of a particular profession.
Read more articles from: The King James Version is Demonstrably Inerrant