Quanzhou during the Song and Yuan had 2 big things going for it. First, the governments of the day saw the value of trade. Trade policies were sometimes restrictive, sometimes unbearably convoluted, but there was still recognition that trade was of value to the country and the dynasty. Secondly, Quanzhou was home to one of China's 市舶司 (shibo si, Maritime Trade Supervisorate). This functioned somewhat like a customs office, checking for contraband, assessing the value of goods, collecting import duties and so forth, which made it convenient for foreign merchants to set up in Quanzhou. Both factors were no longer present during the Ming. Trade drifted away from Quanzhou and it never recovered its former glory.
To begin with trade policies: in 1368, the Hongwu Emperor instituted a new policy, one which rolled trade into the tribute system. Private merchants were no longer allowed to turn up in ships laden with goods like normal people. Instead, a foreign state had to put together a tribute mission. Together with the ship/ships laden with tribute for the Ming Court, merchants of that state could travel with their own cargo for sale.
On arrival, the tribute ship and its envoys continued to the Ming Court. The trade ships stayed and were allowed to trade. When the tribute ship returned, everyone packed up and went home.
At first, many polities were enthusiastic in their submission to the Emperor, sending as many tribute missions as they could muster so they could get their hands on that sweet, sweet China trade. But the emperor soon found that having envoys grovelling at his feet was expensive - the court had to reciprocate with gifts that at least matched if not exceeded the value of tribute given, not to mention feed, house and entertain all the envoys.
Fundamentally, the system was flawed because it combined two aims - trade and tribute - whose needs were in conflict with each other. The above provides just one example - trade was for private profit, but tribute incurred state expense. And since tribute involved the Emperor, it was tribute's needs that were prioritised to the detriment of trade's.
Thus, the system became more restrictive. Foreign states were given a cap on missions depending on the state of relations. For Southeast Asia states this was once every three years, in 1453 Japan was restricted to once every ten years. The length of trading time each mission was permitted was capped at just 3-5 days, again depending on the state of relations. To limit circumvention of the tribute system, Chinese merchants were forbidden to embark on overseas voyages to trade on pain of death.
Quanzhou suffered especially badly from this system. In 1370, it was named as 1 of 3 ports that was allowed to receive tribute missions - Ningbo would receive missions from Japan, Quanzhou would receive missions from Ryukyu, and Guangzhou would receive missions from Southeast Asia. The duties of the Maritime Trade Supervisorate thus changed from serving private trade to serving the needs of the tributary system.
Restricting trade in this way was a big change to Quanzhou. Not only was its infrastructure built to serve a certain volume of trade, it was also meant to serve a diverse range of trading partners. There was now little point in maintaining its famous foreign merchant communities and support structure.
Of course, there were moments when the tribute system became less restrictive. The reign of the Yongle Emperor (1402-1424) saw Zhenghe's voyages and much enthusiasm for tribute, which led to a corresponding increase in traders tagging along. And corrupt officials were always ready to rescue international trade in return for some personal gain. By and large, however, the unpredictability of China’s trade policy discouraged foreign merchants from travelling to Quanzhou.
As trade opportunities dwindled in Quanzhou, the local population turned increasingly to piracy. This went beyond just picking up a sword. Pirates actually formed bonds with local communities and powerful families became patrons of piracy. Zhu Wan, the head of the Ming coastal defence for Fujian and Zhejiang in 1547, found to his horror
Xu Fu, a national civil service degree holder of Tongan County, whose sister was robbed by pirates, joined with them after she married one of them. The result was that their family became rich.
Around the same time, the scholar-official Tu Zhonglü sent a memorial to the emperor, claiming that piracy was a result of ‘evil people who trade with the foreign areas’. In Shaoxing and Ningbo he claimed a population of 10% foreigners and 50% evil locals, in Zhangzhou, Quanzhou and Fuzhou he claimed 10% foreigners and 90% concentrated power of evil locals.
By the mid 1500s these problems had actually been building up for a long, long time. Being a nest of pirates and evil locals made Quanzhou rather less than ideal as a tribute port, so in 1471, the Ming court moved the Maritime Trade Supervisorate to Fuzhou. Henceforth, Quanzhou could not even rely on the Ryukyu tribute trade.
Meanwhile, as foreign merchants going to China dwindled, the number of Chinese going overseas increased. Risking their lives, an increasing number of Chinese bribed officials, loaded their junks and set sail.
However, most Chinese did not set sail from Quanzhou, preferring instead the port of Yuegang for their illicit activities. This port, about 100km southwest of Quanzhou, started to become a hotbed of smuggling activity during the early 15th century. Soon, everyone was in on it. Writing during the Ming-Qing transition in 天下郡国利病书 (Tianxia junguo libing shu, Problems and challenges in various regions of China), Gu Yanwu said
… [In 1547] every household in Yuegang in Zhangzhou Prefecture built seagoing vessels and traded to Siam, Folangji (Malacca) and some other countries.
I don’t know why Quanzhou wasn’t able to muscle in on illicit trading activities, even though it was only a tiny bit further from Southeast Asia. However, at the time Yuegang was a tiny non-administrative town. My guess is that trading there involved paying off far fewer people than Quanzhou.
(Continued in reply)