BEIJING (Reuters) - Only two memories brought tears to Sun Yaoting’s eyes in old age -- the day his father cut off his genitals, and the day his family threw away the pickled remains that should have made him a whole man again at death.

Jia Yinghua (L), the author of "The Last Eunuch of China", poses with China's last eunuch, Sun Yaoting, at Sun's house in Beijing in a 1996 photo. REUTERS/Handout

China’s last eunuch was tormented and impoverished in youth, punished in revolutionary China for his role as the “Emperor’s slave” but finally feted and valued, largely for outlasting his peers to become a unique relic, a piece of “living history.”

He had stories of the tortuous rituals of the Forbidden City, Emperor Pu Yi’s last moments there and the troubled puppet court run by the Japanese during the 1930s. He escaped back to the heart of a civil war, became a Communist official and then a target of radical leftists before being finally left in peace.

This turbulent life has been recorded in the “The Last Eunuch of China” by amateur historian Jia Yinghua, who over years of friendship drew out of Sun the secrets that were too painful or intimate to spill to prying journalists or state archivists.

He died in 1996, in an old temple that had become his home, and his biography was finally published in English this year.

It unveils formerly taboo subjects like the sex life of eunuchs and the emperor they served, the agonizing castrations often done at home and also often lethal, and the incontinence and shame that came with the promise of great power.

“He was conflicted over whether to tell the secrets of the emperor,” said Jia, adding that Sun preserved a loyalty to the old system because he had dedicated so much of his life to it.

“I was the only person he trusted. He did not even confide in his family, after they threw away his ‘treasure,’” Jia added, using traditional eunuchs’ slang for their preserved genitals.

They were discarded during the chaotic 1966-76 Cultural Revolution, when having anything from the “old society” could put lives at risk.

“He only cried about two things; when telling me about the castration and about the loss of his ‘treasure’,” said Jia, who works as an energy bureaucrat, but devotes all his spare time to chronicling the dying days of Imperial China after a childhood enthralled by the eunuchs and princes who were his neighbors.

STERILITY AND POWER

Over years of painstaking research, he has gleaned arcane details about every aspect of palace life, along with secrets about the emperor’s sexuality and cruelty that would look at home on the front page of tabloid newspapers.

For centuries in China, the only men from outside the imperial family who were allowed into the Forbidden City’s private quarters were castrated ones. They effectively swapped their reproductive organs for a hope of exclusive access to the emperor that made some into rich and influential politicians.

Sun’s impoverished family set him on this painful, risky path in hopes that he might one day be able to crush a bullying village landlord who stole their fields and burned their house.

His desperate father performed the castration on the bed of their mud-walled home, with no anesthetic and only oil-soaked paper as a bandage. A goose quill was inserted in Sun’s urethra to prevent it getting blocked as the wound healed.

He was unconscious for three days and could barely move for two months. When he finally rose from his bed, history played the first of a series of cruel tricks on him -- he discovered the emperor he hoped to serve had abdicated several weeks earlier.

“He had a very tragic life. He had thought it was worthwhile for his father, but the sacrifice was in vain,” Jia said, in a house stacked with old books, newspapers and photos.

“He was very smart and shrewd. If the empire had not fallen there is a high chance he would have become powerful,” Jia added.

The young ex-emperor was eventually allowed to stay in the palace and Sun had risen to become an attendant to the empress when the imperial family were unceremoniously booted out of the Forbidden City, ending centuries of tradition and Sun’s dreams.

“He was castrated, then the emperor abdicated. He made it into the Forbidden City then Pu Yi was evicted. He followed him north and then the puppet regime collapsed. He felt life had played a joke at his expense,” Jia said.

Many eunuchs fled with palace treasures, but Sun took a crop of memories and a nose for political survival that turned out to be better tools for surviving years of civil war and ideological turbulence that followed.

“He never became rich, he never became powerful, but he became very rich in experience and secrets,” Jia said.