Some modern commentators feel that that the word is now primarily negative or derogatory in connotation and thus offensive. Other observers indicate that the word can also be used neutrally or even as a compliment. The term has become politically incorrect and is avoided now by most Japanese television broadcasters.
Gaijin and are Japanese words meaning "foreigner." Gaikokujin (外国人) is composed of gaikoku (外国, foreign country) and jin (人, person), so the word literally means "foreign-country person."
The kanji term 外人 is of ancient provenance and can be traced in writing back to Heike Monogatari, written early in the 13th century. At this time, the kanji characters gaijin pronouced as "guwaijin" meant outsider or enemy.
Here, guwaijin means an outsider/stranger or an unknown/unfamiliar person.
In modern Japanese, however, the term is not used as a general reference to outsider or enemy and are exclusively used as a reference to foreigner.
Historically, the Portuguese, the first Europeans to visit Japan, were known as nanbanjin (南蛮人, "southern barbarians"). When British and Dutch adventurers such as William Adams arrived in Japan fifty years later in the early 17th century, they were usually known as kōmōjin (紅毛人, "red-haired people"), a term still used in the Min Nan (Taiwanese) dialect of Chinese today.
When the Tokugawa shogunate was forced to open Japan to foreign contact, Westerners were commonly referred to as ijin (異人, "different people"), a shortened form of ikokujin (異国人, "different country people") or ihōjin (異邦人, "different motherland people"), terms previously used for Japanese from different feudal (that is, foreign) states. Keto (毛唐), literally meaning "hairy Tang", was (and is) used as a pejorative for Chinese and Westerners.
The word gaikokujin was only introduced and popularized by the Meiji government who united the feudal states in Japan as one nation, and this gradually replaced ijin, ikokujin and ihōjin. As the empire of Japan extended to Korea and Taiwan , the term naikokujin (内国人, "inside country people") was used to refer to nationals of other territories of the Empire of Japan. While other terms fell out of use after World War II, gaikokujin remained as the official government term for non-Japanese people.
While all forms of the word mean "foreigner" or "outsider", in practice gaikokujin and gaijin are commonly used to refer to racially non-Japanese groups, principally Caucasians. However the term is also sometimes applied to ethnic Japanese born and raised in other countries. Gaijin is also commonly used within Japanese professional wrestling to collectively refer to the visiting performers from the west who will frequently tour the country. Interestingly, a Japanese-English dictionary also state that "Beware. Use of (English word) "foreinger" to refer to someone could be offensive." Interestingly, a Japanese-English dictionary also state that "Beware. Use of (English word) "foreinger" to refer to someone could be offensive.", with accompanying example, "I'm not a foreigner. I'm an American."
Japanese speakers commonly refer to non-Japanese as gaijin even while they are overseas. Also, people of Japanese descent native to other countries (especially those countries with large Japanese communities) might also call non-descendants gaijin, as a counterpart to nikkei. Historically, some usage of the word "gaijin" referred respectfully to the prestige and wealth of Caucasians or the power of western businesses. This interpretation of the term as positive or neutral in tone continues for some. However, though the term may be used without negative intent by many Japanese speakers, it is seen as derogatory by some and reflective of exclusionary attitudes.
"While the term itself has no derogatory meaning, it emphasizes the exclusiveness of Japanese attitude and has therefore picked up pejorative connotations that many Westerners resent." Mayumi Itoh (1995)
The term is avoided by mainstream Japanese media whenever possible. Now that gaijin has become somewhat politically incorrect, it is common to refer to non-Japanese as gaikokujin.
Gaijin also appears frequently in Western literature and pop culture. It forms the title of such novels as Marc Olden's Gaijin (New York: Arbor House, 1986), James Melville's Go gently, gaijin (New York : St. Martin's Press, 1986), James Kirkup's Gaijin on the Ginza (London: Chester Springs, 1991) and James Clavell's Gai-Jin (New York: Delacorte Press, 1993), as well as a song by Nick Lowe. It is the title of feature films such as Tizuka Yamazaki's Gaijin - Os Caminhos da Liberdade (1980) and Gaijin - Ama-me Como Sou (2005), as well as animation shorts such as Fumi Inoue's Gaijin (2003). It is a recurring word in The Fast and the Furious: Tokyo Drift (2006), where it is used to refer to both the main character, an American, and his love interest.