# Haijin

The Haijin (海禁) or sea ban were a series of related isolationist policies in China restricting private maritime trading and coastal settlement during most of the Ming dynasty and early Qing dynasty.
The policy introduced by the Ming founder Zhu Yuanzhang significantly hampered the growth of China's domestic trade, although the Ming was not able to enforce the policy in full despite official proclamations, and trade continued in forms such as smuggling until the late Ming government opened the port of Yuegang for trade. Initially imposed to deal with Japanese piracy amid the neutralization of Yuan dynasty partisans, the sea ban was completely counterproductive: by the 16th century, piracy and smuggling were endemic and mostly consisted of Chinese who had been dispossessed by the policy. China's foreign trade was limited to irregular and expensive tribute missions, and the military pressure from the Mongols after the disastrous Battle of Tumu led to the scrapping of Zheng He's fleets. Piracy dropped to negligible levels only upon the end of the policy in 1567.
The early Qing dynasty's anti-insurgent "Great Clearance" (1661–1683) also caused considerable devastating effects on communities along the coast, until the Qing seized control of Taiwan and opened coastal ports to foreign trade. Separately, strict travel restrictions were temporarily implemented during the brief trade ban of the "Southern Sea" between 1717 and 1727. Later, the need to control trade gave birth to the Canton System of the Thirteen Factories (1757–1842), where trade ports was heavily restricted.
Similar sea bans occurred in other East Asian countries, such as the Sakoku policy in Edo period Japan by the Tokugawa shogunate; or the isolationist policies of Joseon Korea, before they were forced to end their isolation militarily in 1853 and 1876 respectively.

## Ming dynasty
### Background

The 14th century was a time of chaos throughout East Asia. The second bubonic plague pandemic began in Mongolia around 1330 and may have killed the majority of the population in Hebei and Shanxi and millions elsewhere. Another epidemic raged for three years from 1351 to 1354. Existing revolts over the government salt monopoly and severe floods along the Yellow River provoked the Red Turban Rebellion. The declaration of the Ming in 1368 did not end its wars with Mongol remnants under Toghon Temür in the north and under the Prince of Liang in the south. King Gongmin of Korea had begun freeing himself from the Mongols as well, retaking his country's northern provinces, when a Red Turban invasion devastated the areas and laid waste to Pyongyang. In Japan, Emperor Daigo II's Kenmu Restoration succeeded in overthrowing the Kamakura shogunate but ultimately simply replaced them with the weaker Ashikaga.
The loose control over Japan's periphery led to pirates setting up bases on the realm's outlying islands, particularly Tsushima, Iki, and the Gotōs. These wokou ("Japanese pirates") raided Japan as well as Korea and China.
As a rebel leader, Zhu Yuanzhang promoted foreign trade as a source of revenue. As the Hongwu Emperor, first of the Ming dynasty, however, he issued the first sea ban in 1371. All foreign trade was to be conducted by official tribute missions, handled by representatives of the Ming Empire and its "vassal" states. Private foreign trade was made punishable by death, with the offender's family and neighbors exiled from their homes. A few years later, in 1384, the Maritime Trade Intendancies (Shibo Tiju Si) at Ningbo, Guangzhou, and Quanzhou were shuttered. Ships, docks, and shipyards were destroyed and ports sabotaged with rocks and pine stakes. Although the policy is now associated with imperial China generally, it was then at odds with Chinese tradition, which had pursued foreign trade as a source of revenue and become particularly important under the Tang, Song, and Yuan.
The treasure voyages of Zheng He were partly intended to monopolise overseas trade under the government. They were discontinued due to a rise in Mongol assertiveness after the Emperor's capture at the Battle of Tumu in 1449. The large scale of private overseas trade had caused price competition for the Ming government's purchases, such as warhorses for the northern frontier, and funds had to be reallocated. However, after the end of the treasure voyages, Chinese trade in Southeast Asia and the Indian Ocean continued. Private, including unauthorised, Chinese trade in Southeast Asia expanded rapidly in the second half of the Ming dynasty.
A 1613 edict prohibited maritime trade between the lands north and south of the Yangtze River, attempting to put a stop to captains claiming to be heading to Jiangsu and then diverting to Japan.

### Rationale

Although the policy has generally been ascribed to national defense against the pirates, it was so obviously counterproductive and yet carried on for so long that other explanations have been offered. The initial conception seems to have been to use the Japanese need for Chinese goods to force them to terms. The Hongwu emperor seemed to indicate that the policy was designed to prevent foreign nations from collaborating with his subjects to challenge his rule; for instance, Srivijaya was banned from trading as the emperor suspected them of spying. The usage of trade was also a powerful tool to entice foreign governments to abide by the tributary system and pressure uncooperative leaders. Parallels with Song and Yuan measures restricting outflows of bullion have led some to argue that it was intended to support the Hongwu Emperor's printing of fiat currency, whose use was continued by his successors as late as 1450. (By 1425, rampant counterfeiting and hyperinflation meant people were already trading at about 0.014% of their original value.) Others assert that it was a side effect of a desire to elevate Confucian humaneness (仁, ren) and eliminate greed from the realm's foreign relations or a ploy to weaken the realm's southern subjects to the benefit of the central government. Nonetheless, it may have been the case that the Hongwu Emperor prioritized protecting his state against the Northern Yuan remnants, leaving the policy and its local enforcers as the most he could accomplish and his mention of them in his Ancestral Injunctions as responsible for their continuation.

### Effects

The policy offered too little—decennial tribute missions comprising only two ships—as a reward for good behavior and enticement for Japanese authorities to root out their smugglers and pirates. The Hongwu Emperor's message to the Japanese that his army would "capture and exterminate your bandits, head straight for your country, and put your king in bonds" received the Ashikaga shogun's reply that "your great empire may be able to invade Japan but our small state is not short of a strategy to defend ourselves".
Although the sea ban left the Ming army free to extirpate the remaining Yuan loyalists and secure China's borders, it tied up local resources. 74 coastal garrisons were established from Guangzhou in Guangdong to Shandong; under the Yongle Emperor, these outposts were notionally manned by 110,000 subjects. The loss of income from taxes on trade contributed to chronic funding difficulties throughout the Ming, particularly for Zhejiang and Fujian provinces. By impoverishing and provoking both coastal Chinese and Japanese against the regime, it increased the problem it was purporting to solve. The initial wave of Japanese pirates had been independently dealt with by Chŏng Mong-ju and Imagawa Sadayo, who returned their booty and slaves to Korea; Ashikaga Yoshimitsu delivered 20 more to China in 1405, which boiled them alive in a cauldron in Ningbo. However, the raids on China continued, most grievously under the Jiajing Emperor. By the 16th century, the "Japanese", "dwarf", and "eastern barbarian" pirates of the Jiajing wokou raids were mostly non-Japanese.
Nonetheless, because the sea ban was added by the Hongwu Emperor to his Ancestral Injunctions, it continued to be broadly kept through most of the rest of his dynasty. For the next two centuries, the rich farmland of the south and the military theaters of the north were linked almost solely by the Jinghang Canal. Bribery and disinterest occasionally permitted more leeway, as when the Portuguese began trading at Guangzhou (1517), Shuangyu ("Liampo"), and Quanzhou ("Chincheu"), but crackdowns also occurred, as with the expulsion of the Portuguese in the 1520s, on the islands off Ningbo and Zhangzhou in 1547, or at Yuegang in 1549. The Portuguese were permitted to settle at Macao in 1557, but only after several years of helping the Chinese suppress piracy.
The sea ban was largely unenforceable from its earliest years, and no effective enforcement was ever implemented. Local authorities themselves were frequently involved in the illicit trade, and usually ignored edicts to restrict trade. Military officers brokered trade deals and the wealthy families in the coastal settlements depended on its income. Ordinary workers found employment in trade-related industries. Many of the official posts to enforce trade regulations were left vacant and the Maritime Trading Intendancies were abolished. The court generally ignored the issue of overseas trade. In the 1520s the emperor rejected all attempts to halt the trade as these came from officials who had opposed the emperor's policy of rituals, and very little trade took place under governmental channels instead of illicit means. The Grand secretary of the court in the 1530s was from coastal Zhejiang province, and he proceeded to block any attempt to enforce the sea ban. The most significant attempt to crush out the illicit trade was made by Zhu Wan, an official appointed by the court in the 1540s, but just as he was making headway in wiping out the smugglers he was removed by the court on accusations of unauthorised killings.
Piracy dropped to negligible levels only after the general abolition of the policy in 1567 upon the ascension of the Longqing Emperor and at the urging of the governor of Fujian Tu Zemin. Chinese merchants for both maritime and overland trade could apply for permits to engage in all foreign trade except with Japan (although some still traded there anyway, and Japanese traders also set themselves up in Southeast Asia to trade with incoming Chinese) or involving weapons or other contraband goods; these included iron, sulfur, and copper. The number of foreign traders was capped by a license and quota system; no trading could take them away from China for longer than a year. Maritime trade intendancies were reëstablished at Guangzhou and Ningbo in 1599, and Chinese merchants turned Yuegang (modern Haicheng, Fujian) into a thriving port. The end of the sea ban did not mark an imperial change of heart, however, so much as a recognition that the weakness of the later Ming state made it impossible to continue the prohibition. The state continued to attempt to regulate trade as heavily as it could, and foreigners were restricted to doing business through approved agents, with prohibitions against any direct business with ordinary Chinese. Accommodations could be made, but were slow in coming: the merchants of Yuegang were trading heavily with the Spanish within a year of Maynila's 1570 conquest by Martín de Goiti but it wasn't until 1589 that the throne approved the city's requests for more merchant licenses to expand the trade. Fu Yuanchu's 1639 memorial to the throne made the case that trade between Fujian and Dutch Formosa had made the ban entirely unworkable.
The lifting of the sea ban coincided with the arrival of the first Spanish galleons from the Americas, creating a global trade link that would not be interrupted until the following century.

### China in the global trading system

China acted as the cog running the wheel of global trade. Trade with Japan continued unobstructed despite the embargo, through Chinese smugglers, Southeast Asian ports, or Portuguese. China was entirely integrated in the world trading system.
European nations had a great desire for Chinese goods such as silk and porcelain. The Europeans did not have any goods or commodities which China desired, so they traded silver to make up for their trade deficit. Spaniards at the time of the Age of Exploration discovered vast amounts of silver, much of which was from the Potosí silver mines, to fuel their trade economy. Spanish American silver mines were the world's cheapest sources of it, producing 40,000 tons of silver in 200 years. The ultimate destination for the mass amounts of silver produced in the Americas and Japan was China. From 1500 to 1800, Mexico and Peru produced about 80% of the world's silver with 30% of it eventually ending up in China. In the late 16th and early 17th century, Japan was also exporting silver heavily into China. Silver from the Americas flowed mostly across the Atlantic and made its way to the far east. Major outposts for the silver trade were located in Southeast Asian countries, such as the Philippines. The city of Manila served as a primary outpost of the exchange of goods between the Americas, Japan, India, Indonesia and China. However, there was a large amount of silver that crossed across the Pacific Ocean directly from the Americas as well.
Trade with Ming China via Manila served a major source of revenue for the Spanish Empire and as a fundamental source of income for Spanish colonists in the Philippine Islands. Until 1593, two or more ships would set sail annually from each port. The galleon trade was supplied by merchants largely from port areas of Fujian who traveled to Manila to sell the Spaniards spices, porcelain, ivory, lacquerware, processed silk cloth and other valuable commodities. Cargoes varied from one voyage to another but often included goods from all over Asia - jade, wax, gunpowder and silk from China; amber, cotton and rugs from India; spices from Indonesia and Malaysia; and a variety of goods from Japan, including fans, chests, screens and porcelain.

## Qing dynasty
### Background

As the Qing expanded south following their victory at Shanhai Pass, the Southern Ming were supported by the Zheng clan. Zheng Zhilong surrendered the passes through Zhejiang in exchange for a wealthy retirement, but his son Zheng Chenggong—better known by his Hokkien honorific Koxinga—continued to resist from Xiamen and then, after wresting its control from the Dutch, Taiwan. His dynasty then developed it as the independent state of Tungning, but were driven from their mainland bases in 1661.

### Policy

The Qing regent Prince Rui resumed the sea ban in 1647, but it was not effective until a more severe order followed in 1661 upon the ascension of the Kangxi Emperor. In an evacuation as the "Great Clearance" or "Frontier Shift", coastal residents of Guangdong, Fujian, Zhejiang, Jiangsu, and parts of Shandong were required to destroy their property and move inland 30–50 li (about 16–26 km or 10–16 mi), with Qing soldiers erecting boundary markers and enforcing the death penalty on those beyond it. Ships were destroyed, and foreign trade was again limited to that passing through Macao. Checks and adjustments were made the following year, and the inhabitants of five counties—Panyu, Shunde, Xinhui, Dongguan, and Zhongshan—moved again the year after that. Following numerous high-level memorials, the evacuation was no longer enforced after 1669. In 1684, following the destruction of Tungning, other bans were lifted. The year after that, customs offices were established in Guangzhou, Xiamen, Ningbo, and Songjiang to deal with foreign trade.
Repressive Qing policies such as the queue caused Chinese traders to emigrate in such large numbers, however, that the Kangxi Emperor began to fear the military implications. The immigrant community in Jakarta was estimated at 100,000 and rumors circulated that a Ming heir was living on Luzon. A ban on trade in the "Southern Sea" followed in 1717, with tighter port inspections and travel restrictions. Emigrants were ordered to return to China within the next three years upon penalty of death; those emigrating in future were to face the same punishment.
Legal trade in the South China Sea was resumed in 1727, but the East India Company's discovery that the prices and duties at Ningbo were both much lower than those at Guangzhou prompted them to begin shifting their trade north from 1755 to 1757. The Qianlong Emperor's attempt to discourage this through higher fees failed; in the winter of 1757, he declared that—effective the next year—Guangzhou (then romanized as "Canton") was to be the only Chinese port permitted to foreign traders, beginning the Canton System, with its Cohong and Thirteen Factories. Chinese merchants trading with foreigners, on the other hand, were not affected by any of these regulations.

### Effects

The initial Qing sea ban curtailed Koxinga's influence on the Chinese mainland and ended with his state's defeat, which brought Taiwan into the Qing Empire.
Nonetheless, it was quite harmful to the Chinese themselves, as documented in governors' and viceroys' memorials to the throne. Even before the Kangxi Emperor's restrictions, Jin Fu's 1659 memorial to the throne argued that the ban on foreign trade was limiting China's access to silver, harmfully restricting the money supply, and that lost trading opportunities cost Chinese merchants 7 or 8 million taels a year. The policies revived rebellions and piracy along the coast, while also providing a boon for black markets. The Great Clearance was completely disruptive to China's southern coasts. Of the roughly 16,000 residents of Xin'an County (roughly modern Shenzhen and Hong Kong) who were driven inland in 1661, only 1,648 were recorded returning in 1669. Powerful typhoons that year and in 1671 further destroyed local communities and discouraged resettlement. When trade restrictions were released, Fujian and Guangdong saw enormous outflows of migrants. The conflicts between the former residents and the newcomers such as the Hakka provoked lingering feuds that erupted into full-scale war in the 1850s and 1860s and that fueled Guangdong's piracy into the 20th century.
European countries' trade with China was so extensive that they were forced to risk silver deficits to supply merchants in Asia. As supplies of silver decreased in Europe, Europeans had less ability to purchase highly coveted Chinese goods. Merchants were no longer able to sustain the China trade through profits made by selling Chinese goods in the West and were forced to take bullion out of circulation in Europe to buy goods in China.
The restrictions imposed by the Qianlong Emperor that established the Canton System were highly lucrative for Guangzhou's Cohong—the merchant Howqua became one of the world's wealthiest individuals—and normalized Guangzhou's tax base and inflow of foreign silver. Under the canton system, the Qianlong Emperor restricted trade to only licensed Chinese merchants, while the British government on their part issued a monopoly charter for trade only to the British East India Company. This arrangement was not challenged until the 19th century when the idea of free trade was popularised in the West. The Canton system did not completely affect Chinese trade with the rest of the world as Chinese merchants, with their large three-masted ocean junks, were heavily involved in global trade. By sailing to and from Siam, Indonesia and Philippines, they were major facilitators of the global trading system; the era was even described by Carl Trocki as a "Chinese century" of global commerce. Chinese merchants could also trade freely and legally with Westerners (Spanish and Portuguese) in Xiamen and Macao, or with any country when trade was conducted through ports outside China such as Manila and Batavia. By restricting imports mostly to bullion, however, it created strong pressure on the British—for whom tea had become the national drink over the course of the 17th century—to find any means possible to adjust the balance of trade. This turned out to be opium grown on plantations in India, which became so lucrative and important that the viceroy Lin Zexu's vigorous enforcement of existing laws against the smuggling of opium prompted the First Opium War and the beginning of the unequal treaties that restricted Qing sovereignty in the 19th century. The 1842 Treaty of Nanking opened the ports of Xiamen ("Amoy"), Fuzhou ("Fuchow"), Ningbo ("Ningpo"), and Shanghai, but legal trade continued to be limited to specified ports to the end of the dynasty.