By its structure, the term is not natively Indo-Iranian, so that it would seem to be a loan of the ethnonym of a non-Aryan people so described. It has been speculated by Asko Parpola that the term is related to Meluhha, the name of a trading partner of Bronze Age Sumer, tentatively identified with the Indus Valley civilization. Southworth suggests that the name comes from mizi meaning 'speak', or 'one's speech' derived from Dravidian for language.
The term is not attested in the Vedas, but occurs for the first time in the late Vedic text Shatapatha Brahmana. The law giver Baudhâyana defines a Mleccha as someone "who eats meat or indulges in self-contradictory statements or is devoid of righteousness and purity of conduct" and someone who does not speak the sacred language Sanskrit.
Mleccha in Hinduism could refer to any being who has different teachings than Hinduism and does not follow the Vedas. In the Indian history many Buddhists from the Pala dynasty (Kamarupa) were known as Mlechhas.
In the epic Mahabharata, some Mleccha warriors are described as having "heads completely shaved or half-shaved or covered with matted locks, [as being] impure in habits, and of crooked faces." They are "dwellers of hills" and "denizens of mountain-caves.
In ancient India, this term was also applied by the Aryan kingdoms to foreigners. In the Bhagavata Purana the term is used in the context of meat eaters, outcastes. Medieval religious literature, such as that of Chaitanya Mahaprabhu, also uses the term to refer to those of larger groups of other religions, especially Christians and Muslims.