BEIJING — For much of the past century, the Forbidden City has been an imposing void in the otherwise bustling heart of Beijing.
The 180-acre compound, where emperors and their advisers plotted China’s course for centuries, was stripped of its purpose when the last emperor abdicated in 1912. Since then, the palace grounds have at times lain empty or been treated as a perfunctory museum, with most of the halls closed to the public and the few that were open crammed with tourists on package tours.
But as the Forbidden City approaches its 600th birthday next year, a dramatic change has been taking place, with even dark and dusty corners of the palace restored to their former glories for all to see.
As recently as 2012, only 30 percent of the vast complex was open to the public. Now, 80 percent is accessible — quickly filling with exhibition spaces, stylish restaurants and cafes, bookstores, and highly profitable gift stores, as well as quiet walkways, shady stands of trees and odd nooks that invite contemplation of bygone dynasties.
The revitalization of the Forbidden City has coincided with a broader push in China to protect and project the country’s cultural heritage — an about-face for a Communist Party that came to power vowing to overturn the past and build a new, socialist utopia on the Soviet model.
President Xi Jinping, who has lauded traditional teachings like Confucianism, has pushed “cultural self-confidence” as one of his signature policies. His government has pumped money into reviving traditional cultural practices, and in 2014 Mr. Xi called on the Palace Museum to better showcase its holdings.
The changes have paid off. The Forbidden City is growing increasingly popular. There were a record 17 million visitors in 2018.
“We never used to come here because there wasn’t really too much to see,” said Zhao Li, a 44-year-old software engineer visiting recently with his 12-year-old daughter. “But now we can walk around and see new exhibitions. It makes it easier for younger people or children to grasp the past.”
While the complex’s collection is still impressive, many of the most legendary artworks on display when the museum opened in 1925 are now gone.
Successive emperors had collected some of the best and most iconic artifacts of Chinese culture, especially the monumental landscapes and calligraphy that are among the most highly prized cultural products of Chinese civilization.
But in 1933, the Nationalist Party, or Kuomintang, under the command of Chiang Kai-shek, moved most of the holdings to the south for safekeeping. The prized pieces followed the Nationalists to Taiwan, where they now form the backbone of one of the world’s great museums, the National Palace Museum in Taipei.
Those tumultuous postwar years left the Forbidden City a setting with no jewels.
Its decline seemed cemented when Mao Zedong and his peasant army won China’s civil war in 1949, moving the seat of government into the Zhongnanhai gardens next door to the Forbidden City.
Mao’s Communist government debated tearing down the complex, or creating a vast Soviet-style wedding cake palace opposite it. In the end the turmoil of that era spared the palace, but it was often closed, its staff members at times tortured during political campaigns.
A few years after the Cultural Revolution ended in 1976, the complex was in a sad state. Its mostly wooden buildings were cracked, crumbling and peeling into an ugly grayness.
Only a narrow corridor of the vast, rectangular grounds was open, and renovation work was so shoddy that it seemed like the set of a movie — acceptable at a distance but cheap and makeshift up close.
Improvements began to get more serious in the run-up to the 2008 Olympics, held in Beijing. The main imperial throne room, the Hall of Supreme Harmony, was rebuilt and a few shops were opened, including Starbucks. The coffee chain left, though, in 2007, after a concerted media campaign complaining about an American icon on the palace grounds.
The most striking aspect of the Forbidden City today is that the great walls around it are now mostly open to the public as spectacular walkways, allowing a drone-like view of the grounds. Only the very western wall, which overlooks Zhongnanhai, the equivalent of China’s White House, is off limits.
Also surprising is that government bodies — including the military — have vacated most of the halls they once occupied.
These departures have allowed a new Furniture Gallery to open, displaying the many thrones that emperors used, which had been stored away for decades in warehouses.
Next door is the imperial temple, once one of the most important structures in the complex, which is now being restored.
But even all that new space is not nearly enough to showcase the treasures collected over the centuries by the Sons of Heaven during their imperial reigns. Currently, the Forbidden City can display only about 30,000 objects at a time, or 2 percent of its total.
By 2022, a new campus in the university district of Haidian, about 18 miles to the northwest, is scheduled to open to the public, a 153-acre facility that will have room to show imperial carriages, carpets and regalia.
The museum staff members have also become more creative in using the space. During a recent visit, there was a show on how the imperial family celebrated the Chinese New Year, including reproductions of auspicious New Year’s couplets written by the emperor Kangxi, whose six-decade rule ended in 1722.
The new gift stores, which generated $220 million in sales in 2017, have also lifted their offerings. They once featured little more than key chains and ugly dolls of eunuchs; now, they have historically accurate reproductions of porcelain, textiles and even furniture.
Lisa Tan, a 38-year-old editor at a Beijing publishing house, said the new shops were especially attractive because they offered traditional porcelain or cloisonné made by government-recognized masters using traditional methods.
“It’s good that the Forbidden City is taking a lead in keeping these traditional practices alive,” Ms. Tan said. “Their gift store has even become fashionable in some circles.”
Most visitors are still part of package tours that quickly funnel people through the central part of the complex. But taking a slower, more meandering path through the Forbidden City is a better way to soak up the history and discover some of its secrets.
For a visitor willing to take some time, the most notable and pleasant spots are the wings of the palaces and the courtyards that are now open and where one can sit, drink a tea and watch the vermilion walls shimmer in the summer sun.