A eunuch is a man whose external genitalia have been surgically removed so that he can work as a harem attendant or other court functionary. In some cultures, only the testicles would be removed, while in others, the penis was cut off as well.
Eunuchs were common in Imperial China, and also prevalent in the courts of Sumeria, Assyria, Egypt, Persia, and Anatolia (Turkey). At different points in history, they became the real powers behind the various thrones, wielding enormous influence over the rulers.
The word eunuch comes from the Greek eune "bed" and ekhein "to keep," so "bed-keeper." This reflects a primary function of many eunuchs, protecting a king's wives and concubines.
Example: "The famous Hui Chinese admiral and explorer, Zheng He, was a eunuch."