For centuries in all parts of the world, great rulers were looked after by a court of castrated men known as eunuchs. Throughout the life of the Ottoman Empire eunuchs were employed to guard the harem and the Roman Emperor Constantine the Great was known for favoring being waited on by eunuchs. However, none were as importnant or influential as the eunuchs of the Far East. In China they became particularly influential during the Ming dynasty, but even more than a decade after the abdication of the last Qing Emperor there were still an estimated 1,200 eunuchs living in the Forbidden City at the time of their expulsion.
Like the Chinese emperor who resided inside the "Great Within" in Peking, Vietnam also employed eunuchs as the chief servants and aides to the "Son of Heaven". Eunuchs were the only men allowed to stay in the Forbidden Purple City of Hue along with the Emperor, his wives and concubines. Confucian tradition had always demanded that the rulers of the nation maintain the highest moral standards and the eunuchs were ideal for watching over the Emperor's wives to ensure that all children were the Emperor's. The eunuchs were also thought to be more loyal since they would be considered the lowliest of people in the outside world as well as the most trust worthy to surround the Emperor since they could have no sons to pass power to and so had no reason to gain prestige for themselves (again, at least according to Confucian morality which stressed filial piety above all). Nevertheless, the eunuchs of the Forbidden City were highly regarded simply because of their closeness to the Emperor.
Young eunuchs were raised in the Binh An Du'o'ng, where they were educated before being allowed to join the imperial household. Early on the eunuchs were not subject to any real regulations and became quite powerful, however they never became as corrupt as those in China due to an imperial decree issued by Emperor Minh Mang which limited their favors and defined their role as servants only, no eunuch could be given a title or become a mandarin. Their primary duty was to simply convey orders and wait on the Son of Heaven. He also gave them their own ranking system which determined their pay in rice.
Over time the use of eunuchs became less and less, particularly after the arrival of the French. By the reign of Emperor Thanh Thai, only 15 eunuchs remained; 5 cared for the tombs, 2 served the Queen Mother and and the rest served the Emperor. During the reign of Emperor Duy Tan, in 1914, the use of eunuchs was abolished though those who remained were kept at the palace to serve out the rest of their lives since they had no means of survival outside of the Forbidden City.