Malcolm Moore gains an insight into the mysterious world of the Ming dynasty and the cult of the eunuch.
No one knows if, according to custom, Tian Yi was reunited with his private parts when he died. At the time, Chinese eunuchs would carry their "three jewels" with them in a small pouch, so they could be made whole again in the afterlife.
Sadly, five centuries after his death, there is no record of what happened to Tian Yi's pouch at his mausoleum, which also serves as the world's only eunuch museum.
We do know that the Ming dynasty emperor Wanli's favourite castrato was buried in style.
The Forbidden City fell silent for three days. Tian Yi's body was carried to the west, to the mountains outside Beijing, and placed in a replica of an imperial mausoleum, an unprecedented honour.
Stone carvers worked carefully to decorate his tomb with some of the most intricate marble reliefs ever seen, and even etched small phallic carvings around the bottom of the tomb's buildings.
More than 250 other eunuchs came to pay their respects, and the site, which now sits in a grey-ochre Beijing suburb that is misleadingly called Pingguoyuan, or Apple Orchard, eventually became the site of a nunnery.
When China became a republic, in the early 20th century, the tomb was looted, and when the communists took over, it was boarded up and the site became a kindergarten.
Happily, this means it is one of the best-preserved examples of a Ming dynasty tomb in the capital. Well off the tourist trail, the museum is refreshingly deserted on most days.
During my visit I almost stumbled over a pile of discarded satellite dishes in one corner, and the attendant who took my entrance fee quickly vanished. She left her daughter behind in the museum office, practising her violin.
Inside the museum there was just one Chinese couple, who were on a driving tour of the capital. "We had a book of vouchers that gets us free entrance to lots of museums," the woman said as she tried to explain why they had picked out Tian Yi's grave.
The carvings have survived, and along one wall is a grand line-up of giant stone animals. Tian Yi is depicted by two 3.5-metre statues, one of him as a scholar and the other as a soldier. To enter his tomb itself, I had to cross through the Divine Path gate, which would traditionally have been bolted shut, a dividing line between this world and the next.
The first Ming emperor took a dim view of eunuchs, noting "not one or two of these people out of thousands are good ... [they] can only be given sprinkling and sweeping jobs," but by the time Tian Yi died there were more than 20,000 eunuchs in the palace.
They were the only men allowed inside the private quarters of the Forbidden City - first, because they posed no predatory threat to the women inside and, second, because it was assumed (wrongly) that with no heirs, they would have no ambition.
They became vital go-betweens - any senior official wanting the emperor's attention had to persuade a eunuch to carry his message. In time, they developed a reputation as venal schemers but, as I discovered in the museum, some of China's most famous figures were eunuchs, including Cai Lun, the inventor of paper, and Zheng He, the admiral whose fleet sailed as far as east Africa. Court eunuchs in the Ming dynasty were also the first Chinese to play Western classical music.
Tian Yi, like many other poor Chinese boys, voluntarily underwent castration at the age of nine in the hopes of obtaining a role in the imperial service. In one of the museum's dusty display rooms is a gory diorama of how the operation might have unfolded.
Four life-size clay-brown figures are shown, three standing and one lying on the operating table, stripped from the waist down, and his genitals tied by a string to hold them up.
The Chinese, unlike the Arabs, removed everything. There was no disinfectant, except for chilli paste. Every few years, those who survived the operation would be checked meticulously to make sure no "revitalisation" had taken place.
One of the men holds down the would-be eunuch, while another proffers a tray. The surgeon, meanwhile, has a pained, but grimly determined expression.
In another cabinet is one of the knives used for the act, a rusty four-inch blade curved to a sharp point, with a worrying bump on its top edge.
The star of the museum, however, is a remarkably well-preserved mummy that lies on a bier in its own room. It was found nearby in 2006, the Chinese couple explain, but it is not Tian Yi himself.
It is another eunuch, who may have become a Taoist monk, judging by the style of its hair. Unfortunately, the mummy's bottom half is modestly draped in yellow silk, robbing visitors of perhaps their only chance for a full-frontal peek back into history.
Tian Yi Eunuch Museum is open every day between 9am and 4.30pm at 80 Moshikou Street,Shijingshan district. Nearest metro: Pingguoyuan. Phone + 86 10 88 724 148.
The Telegraph, London