Although there's very little information about Chinese slaves of the Shang (1600 - 1050 BC) and early Zhou (1050 - 256 BC) periods, during the Warring States Period (475 - 221 BC) there is seen a clear legal framework for dealing with slaves. For example, the extensive legal code put forth by the Qin-state reformer Shang Yang (390 - 338 BC). These laws carried over into the short-lived Qin Dynasty (221 - 207 BC) that united all of China proper under one centralized empire for the first time. Preserved information about slavery is far more abundant in the subsequent Han Dynasty (202 BC - 220 AD), which witnessed several notable changes in the law and perhaps attitudes towards slaves.
In ancient Han China, slaves accounted for about 1% of the population. They were classified as being either privately-owned or property of the government. They were usually prisoners of war, tributary gifts from foreign states, or the progeny of slave parents. Slaves could be beaten, yet there were stiff penalties under the law for murdering one's slave. The interregnum ruler Wang Mang (r. 9 - 23 AD) even forced a son of his to commit suicide for murdering one of his slaves. Slaves could purchase their freedom from their masters and manumission by their owners was also common.
The types of forced labor varied widely for government slaves, who could find themselves working with horses in a rustic stable or handling menial tasks in an urban bureaucratic office. The job of craftsman was viewed as a somewhat respectable trade (even more so than being a merchant), but some government workshops had slaves toiling in them. However, the lucrative salt and iron industries employed hired workers, not slaves (even in periods when these were private enterprises and not government monopolies).
Most privately-owned slaves handled domestic work like cooking and cleaning. Agricultural work was rare for slaves, since most farmers were small landowners, with another substantial group being sharecropping tenants who paid rent to large landowners. Other privately-owned slaves could act as entertainers such as jugglers, singers, dancers, and acrobats. Some slaves even acted as armed retainers who could threaten, intimidate, and bully their master's opponents in the street. Such slaves were known to live much more comfortably than the average peasant, since they had access to luxurious clothing and expensive food and wine.
Perhaps the most high-profile slave during the Han period was Jin Midi (134 - 86 BC). He was born into a royal clan of the Xiongnu, the greatest northern nomadic enemy to the Han Empire. Taken as a prisoner of war, he later impressed the Emperor Wu so much with his care of stables that he was made director of the imperial stables. He proved to be a loyal retainer of the emperor, even saving him from assassination. For this he was put into Wu's will as one of three regents to watch over the young Emperor Zhao and govern the empire in his stead. On Jin's deathbed the following year, he was made Marquess of Du at the behest of his co-regent Huo Guang.
SOURCES:
* Ch'ü, T'ung-tsu. (1972). Han Dynasty China: Volume 1: Han Social Structure. Edited by Jack L. Dull. Seattle and London: University of Washington Press. ISBN 0-295-95068-4.
* Hulsewé, A.F.P. (1986). "Ch'in and Han law," in The Cambridge History of China: Volume I: the Ch'in and Han Empires, 221 B.C. – A.D. 220, 520-544. Edited by Denis Twitchett and Michael Loewe. Cambridge: Cambridge University Press. ISBN 0-521-24327-0.
* Loewe, Michael. (1986). "The Former Han Dynasty," in The Cambridge History of China: Volume I: the Ch'in and Han Empires, 221 B.C. – A.D. 220, 103–222. Edited by Denis Twitchett and Michael Loewe. Cambridge: Cambridge University Press. ISBN 0-521-24327-0.
* Nishijima, Sadao. (1986). "The Economic and Social History of Former Han," in Cambridge History of China: Volume I: the Ch'in and Han Empires, 221 B.C. – A.D. 220, 545-607. Edited by Denis Twitchett and Michael Loewe. Cambridge: Cambridge University Press. ISBN 0-521-24327-0.
====
So, in your opinion, how could we compare the institution of slavery in ancient China with the contemporary Greco-Roman world? Or with the Parthians and Sassanids? Or the later Arab world? It was obviously much less important to the maintenance of agriculture and engineering works, since the former was handled mostly by small private farmers and the latter by conscripted labor that many subjects of the Han Empire had to perform.