Emperor at home, king abroad

Emperor at home, king abroad was a system of conducting relations between states within the Chinese cultural sphere. Rulers of lesser regimes would adopt the title of emperor (皇帝; or other equivalents) and/or other imperial titles domestically, and adopt the title of king (王; or other equivalents) when dealing with the dominant Chinese regime. Instead of using the styles Imperial Majesty and Majesty (陛下), rulers of lesser realms were styled as Highness (殿下). This system was applicable to Japan, Korea and Vietnam, as well as less powerful Chinese states, among others.

As China was a hegemonic power in East Asia for a large part of history, surrounding states were compelled to pay tribute to Chinese emperors in exchange for peace and political legitimacy. In this system, lesser regimes accepted the suzerainty of the dominant Chinese power and acknowledged the Chinese emperor as their nominal overlord. Since Chinese emperors claimed to be the Son of Heaven and held supremacy over all under Heaven, rulers of lesser regimes were to use titles subordinate to emperor. The same doctrine also maintained that there could only be one emperor at any given time.

Origin
When the Qin dynasty fell, general Zhao Tuo conquered the commanderies of Xiang and Guilin and proclaimed himself "Martial King of Nanyue" and in 196 BCE he was recognized "King of Nanyue"  after Liu Bang became emperor and founded the Han dynasty. After Liu Bang's death, his officials petitioned his widow Empress Lü to forbid trade in iron between Nanyue and Han; upon hearing the news, Zhao proclaimed himself "Martial Emperor of Nanyue", on par with the Han emperors.

Zhao's troops raided the neighboring Changsha Kingdom, which was part of the Han Empire, before returning to Nanyue. In 181 BCE, Empress Lü dispatched general Zhou Zao to lead troops against Nanyue. However, Zhou's troops fell ill because of the heat and dampness and thus failed to cross the mountains to enter Nanyue; later, they were recalled in 180 BCE after Empress Lü's death. Zhao took the opportunity to menace and bribe the leaders of the Minyue, the Western Ouyue, and the Luoyue into submission. Zhao then stopped sending envoys to the Han court.

In response, Emperor Wen of Han sent Lu Jia to reprimand Zhao. Frightened, Zhao wrote a letter of apology, humbled himself as a feudal subject of the Han Emperor, promised to offer tributes, and publicly announced in Nanyue that he would relinquish imperial title and practices. However, Zhao still secretly designated himself as "Emperor" inside Nanyue and only used titles appropriate for a tributary feudal lord like "king"  when sending envoys to the Son of Heaven.

Korea
The rulers of Balhae used imperial titles, such as Seongwang and Hwangsang, and had independent era names.

In 933, King Taejo of Goryeo was conferred the title of King of Goryeo (高麗國王) by the Emperor Mingzong of Later Tang. Prior to its capitulation to the Yuan dynasty, imperial designations and terminology were widely used by the Goryeo dynasty domestically. Its rulers claimed to be the Son of Heaven, as did Chinese emperors. King Gyeongsun of Silla addressed King Taejo of Goryeo as the Son of Heaven when he surrendered. Even though the Song dynasty, the Liao dynasty and the Jin dynasty were well-informed of Goryeo's use of imperial titles, all three Chinese dynasties tolerated such practice.

The Goryeo dynasty later became a semi-autonomous region of the Yuan dynasty, bringing an end to its domestic imperial system. Its rulers bore the title king and were prohibited from having temple names which were reserved specifically for the Yuan emperors. In 1356, King Gongmin of Goryeo declared independence from the Yuan dynasty.

In 1392, King Taejo of Joseon overthrew the Goryeo dynasty and founded the Joseon dynasty. He was bestowed the title King of Joseon (朝鮮國王) by the Hongwu Emperor of the Ming dynasty. Both domestically and externally, Joseon monarchs held the title of king, unlike the domestic claim of imperial titles before Goryeo's submission to the Yuan dynasty.

Vietnam
In 544, Lý Bôn established the Early Lý dynasty and proclaimed himself the Emperor of Vạn Xuân (万春帝).

In 968, Đinh Bộ Lĩnh founded the Đinh dynasty and declared himself as emperor, abolishing the old title of Jinghaijun Jiedushi (靜海軍節度使), a title of Chinese regional military commander. The Emperor Taizu of Song later bestowed the title King of Jiaozhi Prefecture to Đinh Bộ Lĩnh.

In 986, Lê Hoàn was bestowed the title of Jinghaijun Jiedushi when the emissary of the Song dynasty visited. In 988, Lê Hoàn was promoted to Proxy Grand Commandant (檢校太尉); in 993 to Prince of Jiaozhi Commandery (交趾郡王); and finally in 997 his title was promoted to the King of Nanping (南平王).

In 1010, Lý Thái Tổ established the Lý dynasty and was granted the title Prince of Jiaozhi by the Emperor Zhenzong of Song. In 1174, Lý Anh Tông was bestowed the title King of Annan (安南國王); "Annan" or "An Nam", meaning "the Pacified South", was the name of Vietnam during Chinese rule. Domestically, rulers of the Lý dynasty maintained the use of the title emperor.

Upon proclaiming the Later Lê dynasty, Lê Thái Tổ claimed kingship with the title Đại Vương (大王). It was not until the reign of Lê Thánh Tông did Vietnamese rulers reclaimed imperial titles. The system continued to be used until the end of the dynasty itself, as all rulers claimed imperial status domestically and reverted to royal rank when dealing with China.

The Gia Long Emperor of the Nguyễn dynasty was conferred the title King of Việt Nam (越南國王) by the Jiaqing Emperor of the Qing dynasty. While the Nguyễn dynasty accepted Chinese suzerainty and adopted the title of king when dealing with the Qing dynasty, it entered into foreign relations with other states as Emperor of Đại Việt Nam (大越南皇帝) and later as Emperor of Đại Nam (大南皇帝). Domestically, Nguyễn monarchs also used the title emperor and referred to its realm as the "southern dynasty" (in relation to the Qing dynasty, the "northern dynasty"), implying an equal status with China.

Japan


Chinese emperors originally referred to Japanese rulers as the King of Wa (倭王), while they were called kimi or ōkimi in Japan. Some of the rulers, notably the five kings of Wa, accepted Chinese suzerainty.

During the Sui dynasty, the Japanese diplomat Ono no Imoko delivered a letter by Prince Shōtoku to the Emperor Yang of Sui which claimed the Empress Suiko as "the Son of Heaven where the sun rises", implying an equal status between the Japanese and Chinese monarchs. The Emperor Yang of Sui was angered by such a claim. Since then, the Emperor of Japan has started to adopt the imperial title of Tennō (天皇) both domestically and externally, and the title king (國王) was sometimes used for trade with China by shoguns, who held de facto power in Japan. China did not officially allow Japanese emperors to use the title tennō, although it did little to compel the Japanese rulers into reverting to lesser titles.

During the Tang dynasty, Japanese rulers were conferred the title King of Japan (日本國王). From 630 to 838 Japan sent a total of 19 envoys to the Tang dynasty to stimulate cultural learning and exchange.

During the Yuan dynasty, Kublai Khan demanded the submission of the King of Japan, referring to the Japanese emperor. Japan rejected this demand, which resulted in the Mongol invasions of Japan.

During the Nanboku-chō period of Japan, Prince Kaneyoshi refused to accept the title of king granted by China, and killed seven Chinese ambassadors in retaliation.

The shogun Ashikaga Yoshimitsu accepted the title King of Japan bestowed by the Yongle Emperor due to his desire to establish trade relations with the Ming dynasty.

During the rule of the Tokugawa shogunate, Tokugawa Hidetada changed the title of king to taikun (大君), as a sign of respect to the Japanese emperor. Thereafter, Tokugawa Ienobu switched the title back to king, only to be changed once again to taikun by Tokugawa Yoshimune.