Ancient China covers a long period of time, where the treatment of POWs varied both across time and place. I'll try to cover the main changes towards POWs in ancient China.
While there is some debate, the Shang is believed to have sacrificed many of their POWs in rituals to their ancestors. The reason we believe this is because the Zhou continued much of their sacrifices, until the Early Eastern Zhou, where it seemed the practice of human sacrifice was largely fazed out. Thereafter, POWs were subjected to sacrifical-esque practices. Common was their left ear being cut off, and presenting them in ancestral temples to mimic the sacrifice of animals, as tribute. It is unknown if the POWs were thereafter killed or enslaved. There were certainly rituals that did require bloodletting from the prisoners, such as the consecration of war drums, and it is likely that many died afterwards from the injury caused by such a procedure, though some may have lived and been enslaved. Some experts speculate that if animals were sacrificed to wet the ritual open-air altars, and hunts and war were no different to Zhou era China, then it is likely that many POWs were injured for similar purposes, before being enslaved. Furthermore, surrendering to Early Eastern Zhou elites was akin to being socially dead, and there was a ritual in surrender meant to mimic enslavement.
As time went on enslavement became more and more the norm rather than sacrifice. Mass slaughter, however, in the late Warring States was also common, as the objective of war became to permanently damage the warmaking capacities of the other states. To what extent POWs were executed or enslaved is hard to exactly say, but the tales of wholesale slaughter of entire armies is unlikely. More true is probably the slaughter of a number of the POWs before the rest being enslaved. Prisoners in Ancient China were considered socially dead, and so either putting them to labor or selling them for profit would be more useful than outright killing, from a social functionalist perspective. Besides, the Qin had a policy of rewarding slaves to their soldiers, and it would be sensible that the supply would come from POWs.
One last noteworthy case was that in southern China, during the Eastern Zhou, apparently some convicts were forced to run into the opposing army, slitting their throats to commit suicide as a shock/distraction tactic while the main arm of the army ambushed. It may be these convicts were not POWs, but disgraced soldiers, or perhaps criminals of the state/slaves, but some POWs may have been among these suicide battalions, if they existed.
Sources:
Mark Edward Lewis's Sanctioned Violence in Early China
Paul Cohen's Speaking to History: The Story of King Goujian in Twentieth Century China (for the tales of suicide battalions)
Robin D. S. Yates's Human Sacrifice and Rituals of War in Early China
Robin D. S. Yates's Slavery in Early China: A Socio-Cultural Approach