In the time of the Ming there also began in the east and south the plague of Japanese piracy. Japanese contacts with the coastal provinces of China (Kiangsu, Chekiang and Fukien) had a very long history: pilgrims from Japan often went to these places in order to study Buddhism in the famous monasteries of Central China; businessmen sold at high prices Japanese swords and other Japanese products here and bought Chinese products; they also tried to get Chinese copper coins which had a higher value in Japan. Chinese merchants co-operated with Japanese merchants and also with pirates in the guise of merchants. Some Chinese who were or felt persecuted by the government, became pirates themselves. This trade-piracy had started already at the end of the Sung dynasty, when Japanese navigation had become superior to Korean shipping which had in earlier times dominated the eastern seaboard. These conditions may even have been one of the reasons why the Mongols tried to subdue Japan. As early as 1387 the Chinese had to begin the building of fortifications along the eastern and southern coasts of the country; The Japanese attacks now often took the character of organized raids: a small, fast-sailing flotilla would land in a bay, as far as possible without attracting notice; the soldiers would march against the nearest town, generally overcoming it, looting, and withdrawing. The defensive measures adopted from time to time during the Ming epoch were of little avail, as it was impossible effectively to garrison the whole coast. Some of the coastal settlements were transferred inland, to prevent the Chinese from co-operating with the Japanese, and to give the Japanese so long a march inland as to allow time for defensive measures. The Japanese pirates prevented the creation of a Chinese navy in this period by their continual threats to the coastal cities in which the shipyards lay. Not until much later, at a time of unrest in Japan in 1467, was there any peace from the Japanese pirates.
The Japanese attacks were especially embarrassing for the Chinese government for one other reason. Large armies had to be kept all along China’s northern border, from Manchuria to Central Asia. Food supplies could not be collected in north China which did not have enough surplusses. Canal transportation from Central China was not reliable, as the canals did not always have enough water and were often clogged by hundreds of ships. And even if canals were used, grain still had to be transported by land from the end of the canals to the frontier. The Ming government therefore, had organized an overseas flotilla of grain ships which brought grain from Central China directly to the front in Liao-tung and Manchuria. And these ships, vitally important, were so often attacked by the pirates, that this plan later had to be given up again.