Qin campaign against the Baiyue

As trade was an important source of wealth for the Baiyue peoples of coastal southern China, the region south of the Yangtze attracted the attention of Emperor Qin Shi Huang, and he undertook a series of military campaigns to conquer it. Lured by its temperate climate, fertile fields, maritime trade routes, relative security from warring factions to the west and northwest, and access to luxury tropical products from Southeast Asia, the emperor sent armies to conquer the Yue kingdoms in 221 BC. Military expeditions against the region were dispatched between 221 and 214 BC. It would take five successive military excursions before the Qin finally defeated the Yue in 214 BC.
The book 'Huainanzi' states that 500000 soldiers were mobilized for this operation, but it is a philosophical book and may not be credible.
After Qin Shi Huang defeated the state of Chu in 223 BC, the Qin dynasty in 221 BC undertook a military campaign against the Baiyue in Lingnan to conquer the territories of what is now southern China and possibly as far south as northern Vietnam. The emperor ordered his armies of five hundred thousand men to advance southward in the five columns to conquer and annex the Yue territories into the Qin empire. On another account, one hundred thousand people in armies were the maximum including those transporting provisions and maintaining road pavement as parts of combat service support. As the population of Lingnan were in an earlier Bronze Age civilization, the population would have been reasonably sparse. At the time of the Qin campaign, the population in Lingnan numbered one hundred thousand at the maximum.
The region's vast geographical topography coupled with its rich natural endowment of valuable exotic products motivated Emperor Qin Shi Huang's desire to secure his geopolitical boundaries to the north with a fraction of the Qin army, while devoting a large majority of it towards the south to seize the land and profit from it and concurrently attempting to subdue the Yue tribes of the southern provinces. The Ouyue in southern Zhejiang and the Minyue in the Fujian province soon became vassals of the Qin empire. The Qin armies would face fierce resistance from the Nanyue in Guangdong and Guangxi. At that time, southern China was known for its vast fertile land, rich in rice cultivation, elephant tusks, rhinoceros horns, kingfisher feathers, pearls, jade production, and maritime trade routes with Southeast Asia. Prior to the events leading to Qin dominance over what is now modern Southern China, the Baiyue had gained possession of much of Sichuan to the southwest. The Qin army was unfamiliar with the jungle terrain, and was defeated and nearly annihilated by the southern Yue tribes' guerrilla tactics, suffering casualties of over 10,000 men in addition to the death of a Qin commander. Despite these initial military setbacks, the central imperial government would begin to promote a series of policies for assimilating the Yue tribes through sinicization.
The Qin empire managed to construct the Lingqu Canal to the south, which they used heavily to supply, garrison, rally, and reinforce their troops during its second attempt to besiege to the south. The Linqu canal connected the headwaters of the Xiang River in the Yangzi basin with the Li River flowing into the West River basin. The Qin had extended the construction of canals towards the southern coast in order to profit from international maritime trade coming from Nanhai and the Indian Ocean. Nanhai was a site of strategic attraction for the Qin as it provided an outstanding opening for maritime trade with Southeast Asia, the Indian subcontinent, the Near East, and the European Roman Mediterranean. The canal would facilitate the transportation of military supplies to the Qin troops and prisoners to the Lingnan region for securing and expanding the Qin's borders. With the Qin's superior armament and disciplined military organization of the Qin army, the Qin forces would ultimately prevail over the Yue tribes. By 214 BC, Guangdong, Guangxi, and possibly northern Vietnam were subjugated and annexed into the Qin empire. Building on these territorial gains, the Qin armies conquered the coastal lands surrounding Guangzhou and took areas of Fuzhou and Guilin. The annexed territories were partitioned and administered into new three prefectures of the Qin empire, Nanhai, Guilin, and Xiang. Partitioned into four territories, each with its own governor and military garrison, these coastal territories became the business epicenter of Chinese maritime activity and international foreign trade. During this time, Guangdong was a vastly underdeveloped and primitive semitropical frontier region of forests, jungles, and swamps inhabited by elephants and crocodiles. The cessation of war of the Yue in Lingnan, Qin Shi Huang began his efforts to sinicize the original inhabitants. Half a million people were moved from northern China to the south to facilitate colonial control and undergo assimilation. He used civilians and convicted felons as colonial tools to the Yue territories by setting up various agricultural communities as colonial outposts. He imposed sinification by importing Han Chinese settlers to drive out, displace, weaken, and ultimately eliminate the indigenous Yue culture and sense of Yue ethnic consciousness to prevent nationalism that could potentially lead to the desire of independent states. In addition to promoting immigration, Qin Shi Huang imposed the use of the Han Chinese written script as new language and writing system. Liang Tingwang theorises that there was a proto-Zhuang script which was curbed but later developed into Old Zhuang script or Sawndip. However, most scholars believe that this script originated much later. To exercise even greater control to sinicize and displace the indigenous Yue tribes, Qin Shi Huang forced the settlement of thousands of Han Chinese immigrants, many of which were convicted felons and exiles to move from northern China to settle in the newly annexed Qin domains. Though the Qin emperor emerged victorious against the Yue kingdoms, Chinese domination was brief and the collapse of the Qin dynasty led the Yue tribes to regain their independence.
Following the collapse of the Qin dynasty, Zhao Tuo took control of Guangzhou and extended his territory south of the Red River as one of the primary targets of the Qin dynasty was to secure important coastal seaports for trade. In 208 BC, the Qin Chinese renegade general Zhao Tuo had reached Cổ Loa Citadel, capital of the state of Âu Lạc. There, he defeated An Dương Vương and established the Nanyue kingdom during the same year. Following Zhao's capture of Au Lac, Zhao partitioned it into two prefectures Jiaozhi and Jiuzhen. By the end of the Qin dynasty, many peasant rebellions led Zhao Tuo to claim independence from the imperial government and declared himself the emperor of Nanyue in 207 BC. Zhao led the peasants to rise up against the much despised Qinshi Emperor. With dynastic changes, geopolitical upheavals, famines, wars, and foreign invasions, Han Chinese living within the confines of Northern and Central China were forced to venture out and expand into the unknown regions of the south. Prior to the Qin conquest, what is now modern Southern China encompassed territories beyond the Northern Han Chinese heartland, which were inhabited by diverse non-Han tribal groups that included the vast conglomerations Baiyue whom were regarded by the inbound Northern and Central Han Chinese immigrants as foreign and barbarian. For a long time, what are now designated as the southern parts of contemporary China and Northern Vietnam were considered barbarian, as it was populated by numerous non-Han minorities unaccustomed to Chinese peculiarities that were regarded by the Han migrants as alien and unfamiliar. Zhao opened up Guangxi and southern China to the immigration of hundreds of thousands of Han Chinese and the kingdom of Nanyue was established after the collapse of the Qin dynasty in 204 BC. Zhao established his capital at Panyu (modern-day Guangzhou) and divided his empire into seven provinces, which were administered by a mix of Han Chinese and Yue feudal lords. At its height, Nanyue was the strongest of the Yue states, with Zhao declaring himself emperor and receiving allegiance from the neighboring kings. During Han Wudi's reign in 111 BC, a militarily powerful Han dynasty launched an expedition to conquer and annex Nanyue. Five armies led by the Han general Lu Bode were met by two Nanyue legates at the Giao Chi border; with the two men offering Nanyue's acceptance of the Han dynasty annexation and provided the invading army with 100 cattle, 1000 measures of wine, and other tokens of submission to be absorbed into the Han empire.