walkli
A photograph of the Hanging Temple built into a vertical cliff, showing multiple wooden pavilions supported by beams protruding from the rock, with the canyon floor far below.

The Hanging Temple under the summit overhang, with oak crossbeams visible against the cliff.

Hanging Temple (Xuankong Si)

Datong · Shanxi · China

From a distance, the Hanging Temple looks like a mirage glued to the rock face. Oak crossbeams driven into chiseled holes and hidden iron chains hold 40 halls and pavilions 75 metres above the Jinxia Gorge floor. The structure escapes rain and direct sun beneath a prominent summit, a quiet feat of ancient engineering.

The temple belongs to no single faith. Within its north-south spine, the Hall of Three Religions enshrines Śakyamuni, Lao-Tze and Confucius side by side—a blunt statement of the ‘Three Teaching Harmonious as One’ that prevailed during the Ming and Qing dynasties. Nearby, the Sanguan Hall worships the three Emperor-Officials of Heaven, Earth and Water with Ming-era clay sculptures.

Legend credits a lone monk named Liaoran with starting construction in 491 AD, at the end of the Northern Wei dynasty. The third emperor of that dynasty, Tuoba Tao, had earlier destroyed Buddhist temples but later repented, and his successor ordered a temple built halfway up Hengshan—‘Xuankong Temple’, neither touching the sky nor the ground. In 2015 the temple underwent a full restoration of its paintings and oil decorations, reopening in May 2016.

The Hanging Temple does not announce itself. Tucked into the west side of Jinxia Gorge, it appears as a cluster of wooden eaves clinging to stone, 64 kilometres southeast of Datong. The climb up the narrow canyon reveals the trick: 27 oak crossbeams, fitted into holes chiselled into the cliff, support the entire complex. The main load is hidden inside the bedrock, and iron chains add extra stability. At 75 metres above the ground, the temple is protected from rain erosion and sun bake by the overhanging summit.

The temple’s layout follows the cliff’s natural tilt. From the southern gate, the halls rise as they stretch north. The distance north-south is longer than east-west, and the path ascends steadily. In the northern section, the Hall of the Five Tathagatas and Guanyin Hall anchor the sequence, but the centrepiece is the Hall of Three Religions. There, Buddhist Śakyamuni sits in the middle, flanked by Taoist Lao-Tze and Confucian Confucius—a literal embodiment of the ‘Three Teaching Harmonious as One’ idea that became popular during the Ming and Qing dynasties.

The southern section rises three floors. At its base stands Chunyang Palace, dedicated to Lü Dongbin, one of the Eight Immortals of Taoism. Above it, the Sanguan Hall—the largest hall in the temple—holds Ming-era clay sculptures of the Three Great Emperor-Officials: the officials of Heaven, Earth and Water. At the top, Leiyin Hall (Thunder Hall) returns to a Buddhist theme, with a statue of Śakyamuni.

The history behind the temple is as layered as its faiths. Legend says construction began in 491 AD, at the end of the Northern Wei dynasty, by a single monk named Liaoran. The third Northern Wei emperor, Tuoba Tao, had once ‘abolished Buddhism’ and destroyed temples, but later repented and promoted both Buddhism and Taoism. His successor, Emperor Xiaowen, saw the grand Buddhist temples of Luoyang and ordered a temple built on the cliff halfway up Mount Heng—one that could not reach the sky nor the ground, a hybrid home for the three teachings.

The temple’s precarious perch demands constant care. In September 2015, the China Cultural Heritage Administration approved a restoration project focused on the paintings and oil decorations. The scenic area was closed for overhaul and did not reopen until May 2016. Since then, it has resumed its role as one of the main tourist attractions in the Datong area, alongside the Yungang Grottoes.

Walking through the narrow corridors and steep stairways, you feel the crossbeams shift underfoot—a subtle reminder that this is not a building resting on earth but one held in a cliff’s embrace. The mix of statues, the quiet integration of three philosophies, and the sheer improbability of the structure make it a place that asks you to look up, and to wonder.

Do not miss

Hall of Three Religions

The heart of the temple’s fusion of thought. Statues of Śakyamuni, Lao-Tze and Confucius sit together, illustrating the ‘Three Teaching Harmonious as One’ from the Ming and Qing dynasties.

Sanguan Hall

The largest hall in the temple. Its Ming-era clay sculptures depict the Three Great Emperor-Officials of Heaven, Earth and Water, a Taoist trio rarely seen in such scale.

The Oak Crossbeams

Twenty-seven wooden beams chiselled into the cliff hold the entire complex. From certain viewpoints, they are the only visible supports, lending the temple its floating appearance.

Leiyin Hall

Perched at the top of the southern section, this Buddhist hall dedicated to Śakyamuni offers the highest vantage point over the gorge.

Good questions

Who is credited with building the Hanging Temple?

According to legend, a single monk named Liaoran began construction in 491 AD at the end of the Northern Wei dynasty.

Why does the temple contain Buddhist, Taoist and Confucian elements?

Emperor Xiaowen of the Northern Wei dynasty ordered the temple built halfway up Mount Heng as a place that could not reach the sky or the ground, intended to house both Buddhist and Taoist worship. Later, the Hall of Three Religions formalised the integration of all three teachings, reflecting the Ming and Qing ‘Three Teaching Harmonious as One’ philosophy.

What caused the temple to close in 2015?

In September 2015, the China Cultural Heritage Administration approved a restoration project for the paintings and oil decorations. The entire scenic area underwent an overhaul and did not reopen until May 2016.

Practical
Entry
Not specified in source; check local listings for current fees and restrictions.
Time needed
Not specified in source; allow at least two hours for the climb and halls.
Good to know
The temple was closed for restoration from September 2015 to May 2016; regular maintenance continues due to its exposed cliffside location.
Where
Near Mount Heng, Hunyuan County, Datong City, Shanxi Province, China.
Around the world
Listen · 1 min