Known to all as the Forbidden City, Beijing’s Imperial Palace stands at the northern end of Tiananmen Square, beyond Mao’s famous portrait. It covers an area of almost 180 acres: a vast complex of halls and pavilions and palaces arrayed with perfect symmetry around an intricate series of walled courts, a Chinese puzzle of interlocking pieces, one inside the other – walls within blood-red walls, courts within cobbled courts, a world of layers, a hall of mirrors where every space and every building echoes another. It is a place of secrets, lies and lacquered screens. In a moment the outsider feels lost, disorientated, bewildered, overwhelmed.

In the old days, admission to the inner sanctums, for male visitors, generally cost them their testicles. But entrance prices have fallen somewhat. These days, seven pounds can be probably be considered something of a bargain.

For five centuries, from the 15th century to 1924, the palace was the home of the Chinese Emperor, the Son of Heaven, the Lord of 10,000 Years. Attended by legions of concubines and eunuchs and meeting only the highest mandarins at set-piece formal occasions, the emperor lived inside these layered walls in splendid seclusion.

The Last Emperor, the hapless Pu Yi, left a fascinating account of life inside his gilded cage. While China was getting on with trying to join the modern world, he continued to rule inside the Forbidden City with all the meaningless pomp and ceremony of his ancestors. He records going for a walk. As he never left the palace, walks were fairly short: a ten minute stroll, perhaps, around a few of the courts.

“A procession had to be organised”, Pu Yi reports dismally. In front went a eunuch, whose function was that of motor horn, intoning the sound ‘chir…chir…’ as a warning to anyone in the vicinity to go away at once. Next came two chief eunuchs, advancing crabwise on either side of the path. Ten paces behind them came Pu Yi himself, with two junior eunuchs walking beside him to attend to his wants. Next came a eunuch with a silk canopy followed by a large group of eunuchs carrying changes of clothing, umbrellas, parasols, and a seat in case he wanted to rest. Then came eunuchs of the imperial tea service, with boxes of various kinds of cakes and delicacies, followed by eunuchs of the imperial dispensary, bearing case of medicine and first-aid equipment. At the end of the procession came eunuchs carrying commodes and chamber-pots. A sedan chair brought up the rear in case the emperor suddenly decided he didn’t want to walk at all.

Dinner was equally formal. When the imperial stomach rumbled, the order went out ‘Transmit the Viands’. The ‘Eunuchs-of-the-Presence’ passed the order on to the ‘Eunuchs-Outside-the-Presence’, who in turn hurried away to inform another set of eunuchs in the ‘Imperial Viands Room’, known to you and I as the kitchens.

Within minutes a long column of several-dozen eunuchs were carrying tables and scores of red-lacquered boxes to the Palace of Mental Cultivation. In order that a wide choice was available, 120 separate dishes were prepared for every meal, even when the emperor was dining alone. Taster eunuchs stood outside the hall tasting each dish as a precaution against poison, a ritual known as ‘Appraising the Viands’. Another class of eunuchs laid out the meal: two tables of main dishes; another table of chafing-dishes in winter; and three tables of cakes, rice and porridge. The emperor would eat a few of his favourite delicacies, and the rest was eventually carried away, untouched.

With their unique access to the royal family, the eunuchs were the real power in the Forbidden City. Divided into a complex hierarchy, they ranged from menial servants to high-ranking bureaucrats. The 16th century emperor, Wanli, had 20,000 on the staff. During the Qing dynasty, government cutbacks reduced their numbers to just over 3,000. The last emperor, Pu Yi, had to get by with a skeletal staff of only 1,000 eunuchs. They ran the household, organised audiences, and kept the concubines from escaping over the walls. Despite the lack of cojones, many became key political players, amassing considerable powers of patronage.

Eunuchs generally entered the Forbidden City at the age of eight or nine. Castration was performed by specialists – one of the more famous was known as ‘Pocket-knife’ Liu – using a chair with a hole in the seat. As mutilation was considered grounds for exclusion from the next life, the dismembered parts were returned to the eunuchs, who carried them in a little pouch on their belts, believing that at the time of their death they could deceive the spirits into thinking they were whole. A medical officer made annual check-ups; there was a widespread belief that the missing bits could grow back again.

For the single, unmutilated male in residence, nighttime was a bit of a carnival. The Chinese didn’t expect family values from their monarch. If a chap wasn’t up to bedding 100 nubile consorts, you could hardly expect him to be capable of running the country. The great Kublai Khan, Marco Polo reported, used to bed five at a time, but not before having a noblewoman vet them by “observing them closely during the course of the night, to ascertain that they did not have any concealed imperfections, that they sleep tranquilly, that they do not snore, have sweet breath and are free from unpleasant scent in any part of the body.”

At the Palace of Earthly Tranquillity in the Forbidden City, I peered through the tall doors at the faded splendours inside. It looked dusty and threadbare, the apartments of a down-at-heel aristocracy. Along one wall were broad divans with cushions covered in gold silk. A curved sword in its scabbard hung from a pillar. Chinese lanterns with tassels and carved teak frames hung from the ceiling. The curtains were parted on the nuptial bed, revealing a pile of quilts and bolsters. A Ming emperor used to have his concubines lined up on cots in this hall, so he could move from one to another without having to put his slippers on. The Emperor Tai Chung rather overdid things here one night and died of conjugal excess.

After the excesses of the Ming dynasty, some order was brought to the unruly business of royal coupling. By the 18th century, the emperor would make his nightly selection known by turning over one of the jade tablets bearing the names of each of his wives, consorts and concubines. The eunuchs immediately scurried away to the harem with the tablet and the chosen one was bathed and perfumed. Fearing concealed weapons and assassination, she was always delivered naked, gift-wrapped in yellow silk. One of the stouter eunuchs carried her piggyback to her appointment, dropping her through the back door of the Imperial Bed Chamber.

Each visit was faithfully recorded in the Conjugal Visitors Book, to help verify legitimacy of a possible child. The eunuchs – waiting outside the bed chamber and mindful of the fate of Tai Chung – tried to ensure that the concubine did not stay too long, in case she overtaxed her master. She was never allowed to sleep in his bed chamber. Once the Great Imperial Trumpet had sounded in the Precious Passage of Scented Blossoms, the eunuchs discreetly transferred the lady to a separate room.

Such was the strange parallel universe of the Forbidden City. The Dowager Empress Cixi was astonished to learn that Queen Victoria went out in public. In Beijing, mandarins and eunuchs conspired to keep doors of the Imperial Palaces firmly closed.. Their control of access to the emperor made them both powerful and rich, and left the emperor ignorant and paranoid. An emperor let loose on his empire, so the consensus went, was generally trouble for everyone. The Forbidden City was not just a palace: it was the world’s most elaborate and most luxurious prison.

untitledStanley Stewart is the author of three highly acclaimed travel books and several-hundred articles based on journeys across five continents, for which he has won numerous journalism awards. He is a contributing editor of Condé Nast Traveller and his work appears regularly in the Sunday Times. He has also contributed to the Daily Telegraph, the Guardian, the Independent and the Times. He writes for the National Geographic Traveler in the US, the Sunday Times in South Africa and the Australian.