I was standing on a wooden plank no wider than my shoulders, a vertiginous drop of 75 meters yawing open beneath my feet, when a gust of wind actually made the whole walkway flex. Somewhere below, a tour group gasped in unison. I was clinging to a rail bolted into a cliff face in northern Shanxi, and the Hanging Temple — the Datong Hanging Monastery, as the locals call the Xuankong Si — was doing exactly what its name promises: hanging, impossibly, off the side of Mount Hengshan. Built more than 1,500 years ago, it has outlasted dynasties, earthquakes, and my own wobbly knees. If you only have time for one “how is this even real” moment in China, make it this one.

What Exactly Is the Hanging Temple?
The Hanging Temple (Xuankong Si in Chinese, literally “Temple Suspended in the Air”) is a monastery wedged into the rock about 65 kilometers southeast of Datong, in Shanxi province. What makes it famous isn’t just the death-defying location. It is one of the only surviving temples in China where three faiths share the same roof: Buddhism, Taoism, and Confucianism. Statues of Sakyamuni, Laozi, and Confucius sit together in adjacent halls, which for the year 491 AD was a quietly radical piece of religious diplomacy.
When I first arrived, I expected a single cramped shrine. Instead I found a small warren of 40-odd rooms, linked by corridors and stairs that jut straight out over the void. The datong hanging monastery isn’t large — you can walk its full circuit in twenty minutes — but every step feels like a small act of faith. A Ming-dynasty inscription carved nearby calls it “spectacular” (壮观), a word later echoed by the traveler Xu Xiake, China’s answer to a backpacking blogger.
How Does the Hanging Temple Stay Up?
This is the question everyone asks, usually while white-knuckling the railing. The short answer: clever engineering and a bit of luck.
The monks who built it didn’t drill into the cliff face blindly. They found a natural recess in the rock — a notch where the overhanging cliff shelters the temple from the worst of the rain and sun. Into that recess they drove a grid of wooden beams, called “hanging beams” (悬梁). Here’s the trick most visitors miss: those beams aren’t the main support. The real load is carried by a set of hidden crossbeams, each up to 10 meters long, that were inserted horizontally into holes drilled deep into the cliff and then wedged tight with a mixture of wood and local rock so they can’t pull free. The visible veranda planks rest on these, while the temple’s weight presses inward, not outward — so gravity actually helps hold it to the mountain.
A local craftsman told me the original builders seasoned the pine with tung oil so the wood would resist rot for centuries. “They built it to last longer than the emperors,” he said, grinning. Given that the structure has survived at least two major earthquakes since the Ming era, I’m inclined to believe him. Modern engineers estimate the visible support beams could each bear several tons; the hidden ones do the heavy lifting.

How to Get to the Hanging Temple from Datong
Datong is your base — it’s a compact, increasingly visitor-friendly city with a high-speed rail link to Beijing (about two hours). From Datong, the Hanging Temple sits roughly 65–80 km away near the town of Hunyuan.
- Tour or private car (easiest): Most foreign visitors book a half-day private car or a Datong day tour that bundles the temple with the Yungang Grottoes. Expect 1.5–2 hours of driving each way on decent highways.
- Public bus: Long-distance buses run from Datong’s main bus station to Hunyuan, then a short taxi or local bus gets you to the scenic area. It’s cheaper but fiddly if your Chinese is rusty — I did it once and spent 20 minutes pantomiming “cliff temple” to a confused driver.
- Taxi/Didi: A round-trip Didi with waiting time is possible but pricey; negotiate a flat rate if you hire a driver for the day.
The temple opens early (around 8:00 am in summer) and the lot fills fast. Get there before 10:00 am and you’ll have the planks mostly to yourself.
Tickets, Hours, and Practical Tips
A few things I wish someone had told me before my first visit:
- Tickets: There’s a base entry ticket to the scenic area, plus a separate (and often limited) ticket to actually walk the temple itself. The temple has a strict daily cap on foot traffic to protect the structure, so in peak season the walk-on tickets can sell out by midday. Buy online in advance where possible, or arrive at opening.
- The climb is real: Steps are steep, narrow, and uneven, and the walkways sway slightly. Not recommended for anyone with severe vertigo, mobility issues, or a stroller. Leave the big backpack at the bottom — they make you check it.
- Time your light: Mid-morning sun hits the south-facing cliff beautifully, and you’ll get the cleanest photos before the tour buses roll in.
- Cash or card: Mobile pay dominates, but carry some cash as a backup — my card reader failed once and a 20-yuan note saved my snack run. For payment setup before you fly, see our guide on using Alipay and WeChat Pay as a foreigner in China.
Planning a first trip to China and wondering how Datong fits into a bigger route? Read our [Beijing first-time travel guide](https://www.chinatravelplaces.com/beijing-first-time-travel-guide/) for flights, visas, and a sensible north-China arc.
Best Time to Visit the Hanging Temple
Northern Shanxi has four sharp seasons, and the temple wears them differently.
- Spring (April–May) and autumn (September–October) are the sweet spots: mild temperatures, clear skies, and the cliff face lit warm and golden. This is when I’d send anyone.
- Summer brings heat and the heaviest domestic crowds, especially July–August school holidays. Go at opening and accept the sweat.
- Winter is brutal but magical — the temple dusted with snow, almost no tourists, and a silence you can feel. Just know that ice on the walkways may close the upper circuit.
If you’re building a seasonal plan for the whole country, our best time to visit China overview breaks down each region month by month.

Pair It With the Yungang Grottoes
Here’s the move I recommend to every visitor: do the Hanging Temple and the Yungang Grottoes on the same day. They sit on opposite sides of Datong and together tell the story of how Buddhism arrived and took root in northern China — one carved into a cliff as a working monastery, the other carved as a galaxy of stone Buddhas in abandoned sandstone cliffs west of the city.
The Yungang Grottoes, a UNESCO World Heritage Site (inscribed for their 5th-century Buddhist cave art), are about 16 km west of Datong; the Hanging Temple is 65 km southeast. A private driver can string them together comfortably: Yungang in the morning, lunch in Datong, Hanging Temple for the late-afternoon light. That’s a full but unfrantic day, and you’ll leave understanding why this corner of Shanxi punches so far above its weight.
When I did the combo, a fellow traveler asked me which I preferred. I told him the truth: Yungang stuns you with scale, but the Hanging Temple stays with you — because you were on it, not just in front of it.
Want the grottoes mapped out hall by hall? Our [Datong Yungang Grottoes guide](https://www.chinatravelplaces.com/datong-yungang-grottoes-guide/) covers tickets, the must-see caves, and how to avoid the tour-bus crush.
A Suggested Half-Day Itinerary
If you’re staying in Datong and want just the temple:
- 7:30 am — Depart Datong by car.
- 9:00 am — Arrive, buy/collect walk-on tickets, walk the temple circuit (allow 45–60 min).
- 10:30 am — Hike the short trail to the viewing platform across the ravine for the postcard shot.
- 11:30 am — Lunch in Hunyuan or back in Datong.
- 1:00 pm — Optional: continue to Mount Hengshan’s summit cable car, or loop back west to Yungang.
Mount Hengshan itself, one of China’s five sacred mountains, looms right above the temple, and a cable car can whisk you toward the summit if your legs still trust you. I skipped it the first time and regretted it; the second time, the view back down at the temple dangling off the rock was the photo I still show people.
Why It Belongs on Your China List
There are taller cliffs and older temples in China, but few places make your stomach drop and your curiosity spike at the same time. The Hanging Temple is a 1,500-year-old engineering bet that paid off, a rare three-faith sanctuary, and — let’s be honest — one of the great “no way, people built that” sights on the planet. It’s no surprise it earns a spot among the bucket-list attractions worth the detour in China.
Heading to Datong from Beijing by train? Our [China high-speed train guide for foreigners](https://www.chinatravelplaces.com/china-high-speed-train-guide-foreigners/) walks you through booking 12306, seat classes, and the Datong route.
One last tip from someone who learned it the hard way: wear proper shoes, not flip-flops, and don’t look down until you’re ready. The Hanging Temple rewards the bold — and then quietly holds you up anyway.
