Li Bing was a hydraulic engineer during the Warring States period, and because of his expertise in water management, he became a figure revered like a water deity in people's hearts. The most famous achievement of Li Bing's water control efforts was his construction of the Dujiangyan irrigation system.
At that time, the Qin state conquered Ba and Shu, turning the Shu state into Qin's Shu Commandery. Located on a fertile plain with the Min River flowing through it, Shu became a key source of military grain supplies for Qin's campaigns across the region. In 280 BCE, Qin general Sima Cuo led his troops down the Min River to attack Chu, but upon reaching Shangyu in Chu territory, his army struggled to advance due to a lack of supplies. The problem was that military resources were concentrated in Chengdu, and grain and fodder had to be transported overland from Chengdu to the Min River docks. This poor transportation made it difficult for the army to replenish supplies in time during combat, weakening its fighting capability. So Sima Cuo came up with an idea: to divert the Min River's course so that it would flow past Chengdu.
In 272 BCE, King Zhaoxiang of Qin appointed Li Bing as the governor of Shu Commandery, placing on him the heavy responsibility of diverting the Min River. Li Bing first spent over three years surveying the river's conditions, hoping to safely channel its waters into Chengdu while preventing dam collapses and floods. By 270 BCE, he finally devised a complete flood control plan: to divert the Min River into Chengdu, it was first necessary to build a water conservancy project that could both channel water and prevent flooding.
The Min River, the largest tributary of the Yangtze River, surges down from snow-capped mountains with a swift current, yet it runs dry in drought years and floods in rainy years. The key to Li Bing's flood control project was selecting the right location for the engineering works, which determined the success or failure of the entire endeavor. After extensive on-site surveys, Li Bing ultimately chose the boundary point between the mountainous region and the plain. This location was the throat of the Min River—by locking it down, he effectively controlled the river's flow.

With a plan in place, Li Bing began gathering laborers to start construction.
At this point, a difficult problem emerged: to channel the Min River into Chengdu, it was necessary to pass through a sharp-peaked mountain called Yulei Mountain. Yulei Mountain blocked the river's eastward path, and only by cutting through Yulei Mountain could the water flow into Chengdu. With no other choice, Li Bing had to chisel through the rock and open up the mountain.
Opening a mountain was no easy task, as gunpowder had not yet been invented, so it was impossible to blast open a gap; instead, workers had to rely on hammers, chipping away day after day, bit by bit. However, to split open a large mountain, manual labor alone would take at least thirty years, and the Qin state could not afford to wait that long before attacking Chu. Li Bing then came up with a solution: he first chiseled a deep groove into the rock, then filled it with large amounts of firewood and set it ablaze. The intense heat caused the stone to glow red and expand, at which point he poured icy river water onto the scorching rock. The rapid thermal expansion and contraction shattered the stone completely, allowing laborers to then climb onto the rock and break it apart with axes and hammers. This greatly accelerated the project's progress. Eight years later, Li Bing and his workers finally carved out a gap twenty meters wide, forty meters high, and eighty meters long. This opening resembled the mouth of a bottle, so Li Bing named it "Baopingkou" (Bottle-Neck Channel), and the pile of rock excavated from it was called "Lidui" (Separated Mound).
The reason Li Bing wanted to open such a gap to divert the Min River eastward was not only to redirect its flow toward Chengdu but also because a crucial goal was that only by channeling the river's waters to the east could the flow on the west side be reduced. This way, with less water in the west, flooding would cease, while the east would gain a water source, ending drought—this was the core principle of water management.
After completing this step, Li Bing began diverting the Min River into the "Bottle-Neck Channel." He spent another four years having laborers fill bamboo cages with pebbles, transport them by ferry to the river's center, and drop them into the water. As the pebbles accumulated, they split the Min River into two parts, creating an inner and outer channel. The inner channel was a diversion canal leading to Chengdu, forced into the "Bottle-Neck Channel," while the outer channel followed the Min River's original course. This pebble-built diversion dam, with its head protruding above the river, resembled a large fish's mouth from a distance, earning it the name "Fish-Mouth Diversion Dam."
The waters of the Min River are divided into two branches; because the inner river on the east is narrow and deep, while the outer river on the west is wide and shallow, during the dry season most of the water flows into the inner river with its deeper bed, ensuring that Chengdu does not suffer from water shortages or drought, while during periods of high water, the excess flows into the wider outer river. This design allows the river's flow to be automatically distributed, effectively regulating the water volume between the inner and outer rivers, preventing both drought and flooding.
To better ensure the water balance between the two rivers, Li Bing built a spillway called the "Flying Sand Weir" between the "Fish Mouth Water-Dividing Dike" and the "Precious Bottle Mouth." The "Flying Sand Weir" was also constructed using bamboo cages filled with pebbles, forming a low dam. The top of the weir was built to a suitable height so that when the water volume of the Inner River exceeded the capacity of the "Precious Bottle Mouth," the excess water would flow over the "Flying Sand Weir" and spill into the Outer River, ensuring that the Chengdu Plain was protected from flooding. The weir was named "Flying Sand Weir" because it also had the function of "flying sand." The Min River carried sand and gravel from the snowy mountains downstream, and if this debris entered the Inner River, it would clog the "Precious Bottle Mouth." With this structure in place, when the water flowed down, it would create a whirlpool at this point, causing the sand and gravel to be thrown into the Outer River by the force of the current.
With the three key components—the "Bottle-Neck Channel," the "Fish-Mouth Water-Dividing Dike," and the "Flying Sand Weir"—in place, by 256 BCE, Li Bing had spent fourteen years finally completing the Dujiangyan Irrigation System. To ensure its proper operation, Li Bing also established a maintenance system. When building the system, he buried a stone horse in the riverbed of the inner channel diverted by the Bottle-Neck Channel, decreeing that every year during the dry season, the riverbed must be dredged down to the level of the stone horse to remove silt. At the same time, the height of the Flying Sand Weir had to be adjusted annually so that it could both discharge sand and divert floodwaters. The maintenance system Li Bing established is still in use today.
After the Dujiangyan irrigation system was completed, the waters of the Min River's inner channel nourished the Chengdu Plain, and the local people eagerly dug various canals to use the river's flow for irrigating their farmland, transforming Chengdu into a prosperous region of Shu Commandery. Originally, King of Qin ordered Li Bing to build Dujiangyan to supply grain for the Qin army's campaign against the Chu state, but unexpectedly, this project inadvertently benefited the local populace. To commemorate Li Bing and his son who assisted him, the people built the Two Kings Temple at the head of the Dujiangyan canal. Every year during the Qingming Festival, they would go to the temple to offer sacrifices; after completing the annual maintenance work, they would also hold a water-release ceremony there—Li Bing became a deity in the hearts of the people living in the Dujiangyan irrigation area.