I know that a Mind Flayer is an Illithid, and vice versa. And I know in some of the D&D fiction, like Forgotten Realms and the like, that Mind Flayers refer to themselves or their race as Illithids, but where does this distinction originate from?! Why are there two names for one species/monster?
Just before the AD&D transition from 1e to 2e, several articles appeared in Dragon magazine detailing the "Ecology Of..." various monsters. These reflected the transition of the game itself, moving beyond the simplistic hack-'n'-slash style toward more logical and comprehensive settings, both outdoor and indoor. Published adventuress kept pace, also evolving into more complex and (pardon the term) 'realistic' treatments.
As part of this transition, various monsters initially named for functionality -- such as mind-flayers and carrion crawlers -- were given additional names as being their 'real' or 'racial' titles, sometimes attributed to the races themselves.
Several real-world parallels exist. The Republic of the Union of Myanmar (aka Myanmar) was called Burma for many years until the local name became widely known and used. Various birds are commonly called Wrens, even though their 'true' name (genus) is Troglodytes.
All of these newer and/or alternate names for monsters should be viewed in similar context.
Mindflayer is a colloquial name. In other words, most people probably haven't dealt with illithids enough to know what they call themselves. In any case, it might be interesting to know the first time the use of illithid was in print. Mind flayers first appeared in the official newsletter of TSR Games, The Strategic Review #1, Spring 1975, according to Wikipedia, but I didn't see anything there about the i-word.
The term "Mind Flayer" was used in the monster's brief first appearance in Strategic Review #1, 1975 (with a single short paragraph of text). The term "Illithid" was first used in the AD&D adventure D1, Descent into the Depths of the Earth, 1978. Both texts were written by Gary Gygax.
While the appearance of the new term is not entirely explicated, the other answers are likely in the right direction. Whereas the first appearance was possibly from the presumed perspective of above-world adventurers encountering the things in combat, the appearance in adventure D1 is closer to the creatures' underworld "home", with the first descriptions of some of their motivation and plans, and so perhaps represents their own perspective and self-identification.
Originally they were Mind Flayers, when an article came around describing a world ravaged by them, the author I guess decided to give them an actual name. Wikipedia reference here
As an aside, my distinction was always that Mind Flayers were the Wizard variant, and Illithids were the Psionicist variant. I don't think that was really supported explicitly, and I just went from the MM entry that had Mind Flayers as the main block (alternating between calling them Illithid and Mind Flayer), and a sub block referring to Psionic Illithids.