The foreign relations of Imperial China from the Qin dynasty until the Qing dynasty encompassed many situations as the fortunes of dynasties rose and fell. Chinese culture had influenced neighboring and distant countries, while being transformed by outside influences as well as being conquered. During the Western Han dynasty, the Silk Road trade routes were established and brought Hellenistic Central Asia, Persia under the Parthian Empire, and South Asia into contact with the Chinese empire. During the 2nd century BC, Zhang Qian became the first known Chinese diplomat to venture deep into Central Asia in search of allies against the Mongolic Xiongnu confederation. Han Chinese attempts were made at reaching the Roman Empire and although the mission led by Gan Ying in 97 AD was a failure, Chinese historical records nevertheless maintain that the Romans traveled to southern China and Vietnam via the Indian Ocean. Buddhism from India was introduced to China during the Eastern Han period and would spread to neighboring Vietnam, Korea, and Japan, all of which would adopt similar Confucian cultures based on the Chinese model.

Following the fall of Sasanian Persia to the Rashidun Caliphate, Chinese contacts with the Islamic world were initiated during the Tang dynasty. Foreign faiths entered China at this time, such as Zoroastrianism, Nestorian Christianity and Islam, although Chinese Buddhism and Taoism remained prominent. The Song dynasty dealt on a basis of equality with the neighboring Liao and Jin dynasties until falling to the Mongol conquest. The Mongol Empire became the dominant state in Asia, and the Pax Mongolica encouraged trade of goods, ideas, and technologies from east to west during the early and mid-13th century. Marco Polo could safely travel back and forth, for instance. The Mongol-led Yuan dynasty founded by Kublai Khan ruled from the capital of Khanbaliq (modern Beijing). The Yuan dynasty's failed diplomacy with the Kamakura Shogunate of Japan led to the Mongol invasions of Japan, which also ended in failure for the Yuan Empire.

Following the collapse of the Yuan dynasty and the formation of the Ming dynasty by the Hongwu Emperor in 1368, imperial Chinese power was projected abroad with the 15th-century Chinese treasure fleet of Admiral Zheng He. As representatives of the Yongle Emperor, Zheng's fleet sailed throughout Southeast Asia, the Indian Ocean and to East Africa exacting tribute, granting lavish gifts to vassal states, and even invaded Sri Lanka. However, the fleet was later dismantled and the Ming emperors thereafter fostered Haijin isolationist policies that limited international trade and foreign contacts to a handful of seaports and other locations. These policies saw a gradual reversal after the arrival of European explorers such as Jorge Álvares (the first foreigner to travel to China by sea) and Rafael Perestrello and, although a war was initially fought against the Portuguese Empire, the Portuguese were granted a colonial settlement at Macau in the 16th century. Catholic Jesuit missions in China were also introduced, with Matteo Ricci being the first European allowed to enter the Forbidden City of the Ming emperors in Beijing. During the subsequent Qing dynasty Jesuits from Europe such as Giuseppe Castiglione gained favor at court until the Chinese Rites controversy and most missionaries were expelled in 1706.

The dissolution of the Mongol empire in the fourteenth century made Central Asian trade routes dangerous and forced Western European powers to explore ocean routes. European powers, including the Portuguese, Spanish and Dutch began trading with China in the early 17th century. The Qing court moved to control this burgeoning trade with the Europeans by creating the Canton System in 1756, granting a monopoly of trade to the merchants of the Thirteen Factories and restricted it to Canton (as Guangzhou was then known) in the south. The British Macartney Embassy of 1793 failed to convince the Qianlong Emperor to open northern Chinese ports for foreign trade or establish direct relations. Britain's growing importation of Chinese goods such as tea was offset by their illicit sale of opium to Chinese smugglers. However, the Qing unilateral banning of the sale of opium led to the Opium Wars and Chinese defeat. The 1842 Treaty of Nanking replaced the Canton system with a series of treaty ports, ending the tributary system as well.

Background

In premodern times, the theory of foreign relations of China held that the Chinese Empire was the Celestial Dynasty, the center of world civilization, with the Emperor of China being the leader of the civilized world. This view saw China as equivalent to "all under heaven". All other states were considered to be tributaries, under the suzerain rule of China. Some were direct vassals. Theoretically, the lands around the imperial capital were regarded as "five zones of submission", - the circular areas differentiated according to the strength of the benevolent influence from the Son of Heaven.

There were several periods when Chinese foreign policy took on isolationist tones, because of the view that the rest of the world was poor and backward with little to offer.

Nevertheless, China was a center of trade from early on in its history. Many of China's interactions with the outside world came via the Silk Road. This included, during the 2nd century AD, contact with representatives of the Roman Empire, and during the 13th century, the visits of Venetian traveler Marco Polo.

Chinese foreign policy was usually aimed at containing the threat of so-called "barbarian" invaders (such as the Xiongnu, Mongols, and Jurchen) from the north. This could be done by military means, such as an active offense (campaigns into the north) or a more passive defense (as exemplified by the Great Wall of China). The Chinese also arranged marriage alliances known as heqin, or "peace marriages."

Chinese officers distinguished between "matured/familiar barbarians" (foreigners influenced by Chinese culture) and "raw barbarians".

In many periods, Chinese foreign policy was especially assertive. One such case was exemplified by the treasure voyages of Admiral Zheng He during the Ming dynasty.

Qin dynasty

Although many kings of the Shang and Zhou dynasties ruled beforehand, in 221 BC, the ruler of the Qin state, Ying Zheng (Qin Shi Huang), was the first to conquer the different vassal states under the Zhou dynasty, as well as other non-sinicized states. He was able to transform these different states into a relatively unified and uniform empire, the Qin Empire. Under his leadership and a society modelled around strict adherence to legalist philosophy, his once backwater western frontier state conquered all of the rivaling Warring States in ancient China. The Chinese domain was also extended into Inner Mongolia and Manchuria to the north, and with naval expeditions sent to the south, the indigenous Baiyue of modern-day Guangdong and northern Vietnam (the latter called Jiaozhi, and then Annam during the Tang dynasty) were also quelled and brought under Chinese rule.Mark Edward Lewis, The Early Chinese Empires: Qin and Han (2007).

Han dynasty

The time of the Han dynasty (202 BC–AD 220) was a groundbreaking era in the history of Imperial China's foreign relations, during the long reign of Emperor Wu of Han (r. 141–87 BC), the travels of the diplomat Zhang Qian opened up China's relations with many different Asian territories for the first time. While traveling to the Western Regions in order to seek out an alliance with the Yuezhi against the Xiongnu, Zhang Qian was imprisoned by the Xiongnu for many years, but he brought back detailed reports of lands that had been previously unknown to the Chinese. This included details of his travels to the Greek-Hellenized kingdoms of Fergana (Dayuan) and the Greco-Bactrian Kingdom (Daxia), as well as reports of Anxi (Persian Empire of Parthia), Tiaozhi (Mesopotamia), Shendu (India), and the Wusun Central Asian nomads. After his travels, the famous land trading route of the Silk Road leading from China to the Roman Empire was established. Emperor Wu was also known for his conquests and successful campaigns against the Xiongnu. He warred against the Kingdom of Wiman Joseon in order to establish the Four Commanderies of Han in Manchuria, one of which was established in northern Korea, the Lelang Commandery. The empire began expanding into southern China and northern Vietnam, then the territory of the Baiyue kingdoms. The Han Empire absorbed Minyue after defeating the state, and annexed the Dian in Yunnan. By 111 BC, Emperor Wu conquered the Nanyue kingdom in the Han–Nanyue War. Nanyue was ruled by the Triệu dynasty since the Qin naval officer Zhao Tuo had broken ties with mainland rule in the fall of Qin and establishment of Han.

Yet Chinese trading missions to follow were not limited to travelling across land and terrain. During the 2nd century BC, the Chinese had sailed past Southeast Asia and into the Indian Ocean, reaching India and Sri Lanka by sea before the Romans. This sea route became well traveled not only by merchants and diplomats, but also Chinese religious missionaries in search of further Indian Buddhist texts to translate from Sanskrit to Chinese. In AD 148, the Parthian prince known as An Shigao was the first to translate Buddhist scriptures into Chinese. There were many other Buddhist missionaries as well, including Yuezhi missionaries and Kushan Buddhist missionaries from northern India who introduced Buddhism to China. Emperor Ming establishing the White Horse Temple in the 1st century AD is demarcated by the 6th-century Chinese writer Yang Xuanzhi as the official introduction of Buddhism to China. Also by the 1st century AD, the Chinese made sea contacts with Yayoi Japan, inhabited by what the Chinese termed as the Wa people. By the 1st century, the Chinese also established relations with the Kingdom of Funan, centered in what is now Cambodia, but stretched partly into Burma, Laos, Thailand, and Vietnam.

The Han general Ban Chao (AD 32–102) reconquered the states in the Western Regions (the modern day Tarim Basin in Xinjiang) after pushing the Xiongnu out of the region. This included the kingdoms of Kashgar, Loulan, and Khotan, which were returned to Chinese control. He also sent his emissary Gan Ying even further in order to reach Rome (Daqin). Gan Ying made it as far as the Persian Gulf in the Parthian Empire, but was falsely convinced by Parthian hosts that Rome could only be reached by sailing around the Arabian peninsula. He did however bring back reports of the Roman Empire and its Mediterranean civilization to the Han royal court,de Crespigny, Rafe (2007). A Biographical Dictionary of Later Han to the Three Kingdoms (23–220 AD). Leiden: Koninklijke Brill, pp. 239–240. . and there is evidence that subsequent Roman embassies to China took place.

Period of Disunity

Although introduced during the Han dynasty, the chaotic, divisionary Period of Disunity (220–589) saw a flourishing of Buddhism and travels to foreign regions inspired by Buddhist missionaries. There were Indian monks such as Kumarajiva (344–413) from Kucha who traveled to China in order to translate Sanskrit texts into Chinese. There were also many Chinese who traveled abroad in order to obtain and translate Buddhist sutras into Chinese, such as the Chinese monk Faxian (337–422), who in his old age traveled to Sri Lanka, India, and Nepal. From China, Buddhism entered Korea by 372. It was first practiced in the northern state of Goguryeo, and would eventually develop into distinctive Korean Buddhism. As recorded in the Nihon Shoki, Buddhism in Japan was introduced by 552 with a religious mission sent by Seong of Baekje, ruler of one of the three Korean kingdoms.

Three Kingdoms