Background
The Han forces had earned many major victory against Chu, but they still did not control most of the country. Most of eastern China was still under Chu control. Eventually Xiang Yu was able to reorganize his forces, and strike back at Liu Bang.
At this point, major disagreements had occurred between Liu Bang and Han Xin. The primary reasons were because Liu Bang refused to gave Han Xin too much control over the Han army, and his refusal to use many of Han Xin's suggestions. As a result, Han Xin withheld his forces in Qi as Liu Bang was under siege from Xiang Yu. Liu Bang was only able to hang on because of the assistance from another excellent military strategist Zhang Liang.
Xiang Yu was one of the best warrior-commanders in Chinese history, but in most battles he rarely paid sufficient attention to resource logistics. In this battle, Zhang Liang was successful in assaulting Xiang Yu's supply lines, which Xiang Yu did not care much about, and this greatly hurt the Chu army's effectiveness. On the other hand, Zhang Liang was successful in keeping the Han supply lines open. During a conversation, Xiang Yu's archer hit Liu Bang with an arrow, which wounded his lung. However, Liu Bang was able to hide this fact from his own army and Xiang Yu, hence keeping the morale of the Han troops high.
Xiang Yu then threatened to kill Liu Bang's captured father and wife and have them cooked over fire, to force Liu Bang to surrender. Liu Bang simply replied that since the two had being named 'brothers' he would be effectively cooking his own father, and that Xiang Yu should not forget to send him a cup of 'their' father's flesh to share as good brothers, but Xiang Yu still did not kill them. At one point, Xiang Yu was about to capture Liu Bang. Finally, Liu Bang agreed with everything that Han Xin requested, and Han Xin finally agreed to help. Later, with the arrival of Han Xin, Liu Bang was able to convince Xiang Yu to a peace treaty. At the end, both parties agreed that the two countries of Han and Chu can co-exist peacefully. Liu Bang 's father and wife was returned to Liu Bang. Then, in October 202 BC, Xiang Yu started to move his forces back east.
The battle
Unknown to Xiang Yu, this was a tactic from Han Xin. The Chu forces had sieged the Han fortress for a long time, leaving them tired. On top of that, Chu troops were getting less food than they needed to fight effectively. When news reached them that the war was over, and that there would be long term peace ahead, they were overjoyed.
Han Xin then lead many attacks against the joyful Chu forces. In anger, Xiang Yu tried to fight his way back to Liu Bang's fortress, but Han Xin had set up many traps and ambushes along the way. Finally Xiang Yu decided that a quick victory was no longer possible, with his low morale troops, and decided to temporarily retreat back to the Chu capital, and regroup there.
Han Xin knew that he could not let Xiang Yu return to the capital. Han Xin ordered his forces to increase the amount of ambushes, in order to force the Chu troops into a canyon area near Gaixia, where Xiang Yu could not move at will. As the ambushes increased, Xiang Yu, an excellent strategist, became more and more certain that the main traps would await him inside the canyon. So although his troops were constantly ambushed, he insisted that his troops head straight back to the capital city though the main road as fast as they could, avoiding the side paths though the canyon.
Unfortunately for Xiang Yu, the fortune turned against him, despite his military genius. In one of the ambushes, Xiang Yu's beloved wife Yuji, who always traveled with his forces, was captured by Han troops . Han Xin immediately ordered that she be taken into the canyon. Xiang Yu, without a choice, sent most of his tired forces back to the capital on the main road, while he himself led a smaller force of 100,000 soldiers into the canyon to save his wife.
The trap
It was Xiang Yu's hope that, he would be able to save his wife quickly, and get out before getting totally entrapped. Unfortunately, the Han forces, under Han Xin's orders, moved his wife deep into the canyon. By the time he finally reached them and saved his wife, he and his army were already too deep into the canyon to retreat safely.
Han Xin then proceeded with his master plan: "Ambush from Ten Sides" . Han Xin first fought Xiang Yu face to face, and then retreated. Xiang Yu immediately gave chase, but soon found himself trapped among the numerous Han army. Everywhere Xiang Yu led his forces, there were ambushes and traps waiting for them. These not only caused heavy casualty for Chu, but also crushed the Chu army's morale, since escaping alive seemed impossible. The troops were trapped in the canyon until Dec 202 BC.
To further break the Chu army's spirit, Han Xin employed the "Chu Song from Four Sides" tactic. He ordered the Han soldiers and captured Chu troops to sing Chu songs. The Chu songs made the Chu troops remember their families back home, greatly reducing their will to fight. Even Xiang Yu himself thought that the whole Chu had been conquered, while he was trapped here.
Then the Chu soldiers started to leave their camps and escape on their own. Initially Xiang Yu tried, with force, to stop his troops from leaving the ranks. But when the soldiers and his wife beg of him to let the soldiers go home, Xiang Yu sadly agreed. On the same night, Xiang Yu's wife, at age 16, committed suicide, because she considered herself the primary cause of the fall of the Western Chu . This event broke even Xiang Yu's spirit.
About 800 loyal soldiers left behind and stayed with Xiang Yu, swearing to fight for him till the very end. Xiang Yu was impressed with their loyalty, and promised to lead them to safety.
Xiang Yu commits suicide
Han Xin successfully broke the spirits of the Chu troops, and that broke the Chu ranks, without a fight, as he expected. But the event had an advantage to Xiang Yu. When the Chu army size was still large, they cannot move as they wanted, since they were easy to spot. But now Xiang Yu only had 800 men on horses, which allowed him to move much more easily. Xiang Yu was able to break though the traps and ambushes, and escaped the canyon with about a hundred men.
Eventually, Han Xin discovered in shock, that Xiang Yu had escaped from the entrapped cannon. Upon discovering this, Liu Bang ordered 5,000 elite cavalry to chase down Xiang Yu. Liu Bang ordered the cavalry to not kill Xiang Yu, but capture him.
Unfortunately for Xiang Yu, after he left the canyon, he soon got lost. He tried to ask local people for directions back to Chu, but they pointed him to the wrong direction, maybe intentionally because they were loyal toward Han. Xiang Yu then went into the swamps. This cost him valuable time for escape. At the end, the elite cavalry chased him to Wu River. When Xiang Yu refused to surrender, his loyal men were slaughtered to the last man, trying to buy Xiang Yu some time to escape. Xiang Yu had an opportunaty to use a local boatsman to escape across the river back into Chu territory, but he did not have the face to do so. Instead, after making a last stand against the soldiers that attempted to capture him alive, and he himself seriously wounded, he slit his own throat.
Aftermath
The loss of Xiang Yu was a major blow to Western Chu. Xiang Yu 's brother tried to take command over Chu, but he was mostly a fighter and not a military strategist. No one else in Chu had the army leading ability of Xiang Yu, and hence no one can win any battles against Han Xin and Zhang Liang. Soon, Chu fortresses started to surrender to , and Liu Bang treated all surrendering Chu forces with respect. Had Xiang Yu successfully retreated back into Chu, Chu might had been able to stop Han 's advance, at least for a while.
Soon after the death of Xiang Yu, Chu would fall to Han, and the Han Dynasty, one of the greatest Chinese dynasties, was established.
Debates
*Liu Bang first signed a peace treaty with Xiang Yu, and then ambushed Xiang Yu when he was making his way back to Chu. As a result, many people considered Liu Bang a deceitful man. But it was also possible that Han Xin forced Liu Bang to ignore the peace treaty, as part of the deal for him to help Liu Bang. Han Xin had long wanted to defeat Xiang Yu in a decisive battle, as to prove that he was the better strategist. Before the battle, Han Xin 's Qi turned down Xiang Yu 's offer of an alliance, probably for the same reason. It seemed unlikely that Xiang Yu, being an intelligent man, would have accepted the peace treaty in the first place, if Liu Bang was such a dishonest man.
*Another debatable part of this story was Xiang Yu going into the canyon to save his wife, even though he knew it was a trap. In the military point of view, this was a horrible decision. In another view, Xiang Yu shown that he loved his wife much more than his empire.
*It was possible that, the popular game Xiangqi was invented by Xiang Yu at the time of the peace treaty. The story said that, Xiangqi was made, so that all future battles between Chu and Han can be fought over this game, hence no further human life losses needed to be suffered by neither side. In another version of the story, Liu Bang invented Xiangqi, not Xiang Yu. Also, the line that divides the board into 2 parts is marked "Chu River" on the black side and "Han Border" on the red side. There is no historical evidence for this mouth to mouth story.