"Marriage for peace" (heqin 和親) was a traditional mode of "international" or diplomatic relations between the Chinese dynasties and powerful states in the northwestern neighbourhood, mostly steppe federations like the Xiongnu 匈奴 or Türks (Tujue 突厥), or the Tibetan kingdom (Tubo 吐蕃). On the one hand, marriage with a Chinese princess obliged foreign rulers to refrain from military actions in the border regions, and on the other, the foreign ruler was accepted by the Chinese court as a representative-relative of the emperor over his dominion, a constellation allowing China to exert indirect rule over non-occupied lands. A third reason for betrothing a foreign ruler with a Chinese princess was to reward him for military support in internal quarrels in China.
The term heqin is first seen in the Classic Zuozhuan 左傳 (year Xianggong 襄公 23), but at that time denoted general peaceful relationships between neighbouring regional states, also, but not exclusively, by intermarriage.
In the sense of appeasement, the word or concept of heqin was first used in the very early Han period 漢 (206 BCE-220 CE), when Liu Jing 劉敬 (Lou Jing 婁敬) suggested to Emperor Gaozu 漢高祖 (r. 206-195 BCE) to send the Xiongnu khan Mo-du 冒頓 (a special reading, r. ?-209 BCE) a Chinese princess of higher standing (zhang gongzhu 長公主) or a female commoner designated as a such. In effect, the Han court produced a female consort for the khan, but not a princess, because Empress Lü 呂后 (. 180 BCE) refused to send her only daughter into the "barbarian" land. Interestingly enough, the Empress, after being widowed, was herself (ironically?) asked by the Xiongnu khan whether she wanted to become his spouse. In 105 BCE, the daughter of the Prince of Jiangdu 江都王 (Liu Jian 劉建), called Xijun 細君, was married to Kun-mo 昆莫, chieftain of the Wusun 鳥孫. Most famous is Wang Zhaojun 王昭君, member of the imperial harem who was in 33 BCE married to the Xiongnu khan Hu-han-ye 呼韓邪 (r. 58-31 BCE).
Historical records allow assembling of statistical data, which say that the Han dynasty used 13 times the politics of "peace by marriage" with the Xiongnu or the Wusun, six times sending a princess, and seven times a palace woman. During the Wei 曹魏 (220-265) and Jin 晉 (265-420) periods, the method intensified and was applied as much as 30 times; the Sui dynasty 隋 (581-618) used it 6 times, and the Tang dynasty 唐 (618-907) 27 times, the main recipients being the rulers of the Türks, the Uyghurs (Huihe 回鶻), Tibet and the Tuyuhun 吐谷渾. If intermarriage between the Manchus and the (Inner) Mongols is counted as heqin politics, the Qing dynasty 清 (1644-1911) created 22 heqin marriages (Gao 1995, Zhang 1993: 418).
From these data it can be seen that the method, even if in common usage brought into a relationship with the Han dynasty, the Taɣbač 拓跋, which founded the Northern Wei dynasty 北魏 (386-534), were most actively using the politics of heqin. No heqin marriages took place during the Song 宋 (960-1279) and Ming 明 (1368-1644) periods. This might be due to ideological constraints of Neo-Confucianism which forbade formal intermarriage with non-Chinese peoples, yet perhaps also because the enemies of the Song, the Liao 遼 (907-1125) and Jin 金 (1115-1234), preferred to marry among their own people. The empire of Liao, founded by the Para-Mongolian Kitans 契丹, intermarried with the precursors of the Western Xia 西夏 (1038-1227) which hailed from the Tanguts 黨項.
Of all heqin marriages over time, 107 were indeed to be understood as a means of securing peace. Political marriages were usually accompanied by rich loads of plain silk and brocades. A theoretical discussion was carried out during a court conference in 81 BCE. Its main arguments and conclusions are recorded in the book Yantielun 鹽鐵論 (ch. 48 Heqin 和親).
The Western Wei 西魏 (535-556) appeased the steppe federation of the Rouran 柔然 in 535 by sending their khan A-na-gui 阿那瓌 (r. 520-552) Princess Huazheng 化政公主, and Emperor Wen 西魏文帝 (r. 535-551) also took to his wive a daughter of the Rouran khan, and even elevated her to the status of Empress after having demoted the original empress, which herself hailed from the Yifu 乙弗氏 family of the Tuyuhun. In 551, Emperor Wen sent Princess Changle 長樂公主 to marry the founder of the Türkish khanate, Tu-men Qaghan 土門可汗 (r. 552). The Eastern Türks used the weakness of the north Chinese dynasties during the late sixth century, but also sent their own princesses to marry Chinese emperors, like in 563, when the daughter of Mu-gan Qaghan 木桿可汗 (r. 553–572) married Emperor Wu 周武帝 (r. 560-578) of the Northern Zhou dynasty 北周 (557-581). Emperor Jing 北周靜帝 (r. 579-581) elevated a female of the household of the Prince of Zhao 趙 to the status of Princess Qianjin 千金公主 and gave her into marriage to Tuo-bo Qaghan 它缽可汗 (r. 572–581).
Concerning the status of Chinese females given into marriage, the Han period saw the tendency that in the beginning, princesses were sent to the steppe, while in later years, when the Xiongnu were less martial, women of minor standing were betrothed. The Tang period experienced the reversal trend, and could send distant relatives of the imperial house in the early years, while the Tibetans and Uyghurs required genuine daughters of emperors in the later decades of the Tang.
The northeastern border of the Sui empire was not just threatened by the Türks, but also by the Tuyuhun, to whose ruler, Shi-fu Qaghan 世伏可汗 (r. 591-603), Emperor Wen of the Sui married Princess Guanghua 光化公主 in 596. Shi-fu's younger brother and successor Fu-yun 伏允 (r. 603-635) followed local custom and took Princess Guanghua into his harem, but also sent annual tributes to the court of the Sui. A year later, the Eastern Turks requested a Sui princess, and the khan received Princess Anyi 安義公主 into marriage, and after her death in 599, Princess Yicheng 義成公主 (d. 630).
The Türks played only a minor role in the marriage politics of the Tang empire. In 640, the king of the Tuyuhun asked for a heqin liaison, and was given Princess Honghua 弘化公主 (623-698) into marriage. The king's sons were also married with Chinese ladies of lesser rank. In 715, the ties to the chieftain of the Xi 奚, Li Dafu 李大酺 (being allowed to bear the imperial family name Li), in the northeast was intensified by giving away Princess Gong'an 固安公主 in 717, and Princess Cheng'an 成安公主 was wedded to his successor Li Lusu 李魯蘇. Li Tingchong 李延寵 was given Princess Yifang 宜芳公主 (d. 745).
The greatest importance in the diplomatic relations of the Tang empire had Tibet, whose king Songtsen Gampo 松贊干布 (r. 618-641) married in 641 Princess Wencheng 文成公主 (628-680). Princess Wencheng took with her a huge amount of gold and silver objects, high-quality silks along with looms and spinning wheels, farming tools, books of various genres, medicine, and calendric manuals. This treasure of cultural achievements, presented to the Tibetans, inspired the demand for more of such objects. In modern terms, one would say these "giveaways" initiated the sales of more objects produced in China.
In 707, Emperor Zhongzong 唐中宗 (r. 683-684, 705-709) sent to Tibet Princess Jincheng 金城公主 (a daughter of Li Shouli 李守禮, Prince Yong 雍王), who took with her an abundance of artwork, classical books from China, craftsmen, and also a music troupe from Qiuci 龜茲 in the Western Territories. The princess was picked up from the Tang capital Chang'an 長安 (present-day Xi'an 西安, Shaanxi) by a diplomatic mission with no less than 1,000 persons. The emperor himself accompanied her to Shiping 始平 (close to Xianyang 咸陽, Shaanxi), and at that occasion proclaimed a general amnesty for the district. In 733, both countries erected a bilingual stele at the border point of Chiling 赤嶺 (today in Huangyuan 湟源, Qinghai). The inscription (preserved in the encyclopaedia Cefu yuangui 冊府元龜) explains that both countries vowed not to attack each other and reflects the interstate meeting and alliance (huimeng 會盟) from the Shenlong reign-period 神龍 (705-706), and that of 732. The princess died in 740. Both princesses, Wencheng and Jincheng, held important positions in the commemoration of Tibetan history, are depicted in wall paintings and as statutes, and are venerated like ancestors of the Tibetan people.
The Uyghurs were successors of the Türks and founded a powerful khanate in the western region. For his support in fighting against the rebel An Lushan 安祿山 (703-757), the Tang not only bestowed Ge-le Qaghan 葛勒可汗 (r. 747-759) an official title of rulership (Yingwu Weiyuan Qaghan 英武威遠可汗, the "Martial one with far-reaching authority"), but betrothed him with Princess Ningguo 寧國公主 (d. 791), a daughter of Emperor Suzong 唐肅宗 (r. 756-762). When the khan died, the princess returned to Chang'an. In 769, a daughter of general Pugu Huai'en 仆固懷恩 was elevated to the status of Princess Chonghui 崇徽公主, and married to the Uyghur khan. In 787, Dun-mo-he Qaghan 頓莫賀可汗 (r. 780-789) received an imperial spouse in the person of Princess Xianning 咸寧公主. She was received with greatest honours and welcomed by two Uyghur princesses and the chief counsellor of the khan. Emperor Dezong 唐德宗 (r. 779-804) himself hosted Uyghurian diplomats and had the princess accompanied by the Minister of Justice (xingbu shangshu 刑部尚書). Princess Ding'an 定安公主 was sent into marriage to the Uyghurs in 821. The last Tang spouse, Princess Taihe 太和公主, returned from the northwest in 843. She was treated with great honours and was given the title of Grand Princess Anding 安定大長公主.
In a cultural perspective, the marriage of Chinese princesses or palace women with foreign rulers brought "advanced" customs and habits to the steppe. The princesses and their entourage were held in high esteem and spread the culture of China to other peoples, and made the exchange of commodities much easier than without such a relationship.
On the other hand, marriage with a "barbarian" khan, forced to live in a foreign environment, exposed Chinese females to saddest thoughts of home. As consorts of "barbarians", Chinese princesses had to submit to foreign law and customs. In 102 BCE, Princess Jieyou 解憂公主, granddaughter of the Prince of Chu 楚, Liu Wu 劉戊, was given in marriage to the Wusun khan Kun-mo's grandson Jun-xu-mo 軍須靡, but the latter died not long thereafter. According to the custom of the Wusun, Jun-xu-mo' cousin Weng-gui-mi 翁歸靡, new ruler of the Wusun, took Princess Jieyou into his harem. She bore him three sons and two daughters. The marriage alliance between the Han and the Wusun was used as a spearhead against the Xiongnu. In 51 BCE, in old age, the Princess returned to Chang'an. Wang Zhaojun also married her husband's successor after the former's death. She bore children to both, but was not allowed to return to China.
Finally, in a patriotic or nationalist sense, the heqin method can be called a "shame" for Chinese dynasties in times of weakness.
Popular culture adopted the theme of heqin and made heroines of princesses, like Wang Zhaojun or Princess Wencheng. A typical topos is the story of "Zhaojun going beyond the [Jiayu] Pass" (Zhaojun chu sai 昭君出塞). It is reflected, for instance, in Cai Yong's 蔡邕 (133-192 CE) song collection Qincao 琴操 (only texts preserved), or the theatre play Hangongqiu 漢宮秋 ("The Autumn in the Palace of Han") by Ma Zhiyuan 馬致遠 (c. 1250-1321).