Hanging Temple in a short answer
The Hanging Temple, or Xuankong Si, is a wooden monastery bolted to the face of a cliff in Shanxi province, about sixty kilometers from Datong, and it has been hanging there in some form for around fifteen hundred years. When I first saw it, the morning light was flat and the temple looked like it had been slid into a crack in the rock rather than built, which is close to the truth. The short advice: go early, go on a weekday, and treat it as a half-day stop paired with the Yungang Grottoes and an overnight in the old town of Pingyao ancient city. The walkways are narrow, the drop is real, and the crowds by mid-morning make the whole thing less pleasant than it should be.
What the temple is and why it survives
The temple was first raised in the Northern Wei dynasty, around 491 AD, the same era that cut the Yungang caves down the road. It was built by monks who wanted a quiet, defensible place to practice, and the cliff overhang protects the wood from rain and sun, which is the main reason any of it is still standing. The structure is not actually floating: a network of crossbeams was driven into holes chiseled in the rock, and the wooden frame sits on those, with the cliff taking most of the load. Restoration work over the centuries has replaced timbers, but the principle is the original one.
What sets it apart from any other temple in China is the mix of faiths under one roof. The halls honor Buddhism, Taoism, and Confucianism side by side, which was unusual then and is still rare now. You walk past a Sakyamuni hall, a Laozi hall, and a Confucius niche within a few steps, a compact statement that the builders saw no contradiction. That detail, more than the vertigo, is what makes the place worth the trip.
Getting there from Datong
Most people base in Datong, the coal city that is also the gateway to the northern Shanxi sights, and take a bus or a hired car to the temple at Hengshan, the northern sacred mountain. The drive is about an hour and a half on a decent road. A taxi or a day driver costs more but saves the wait, and a driver who knows the route will also time your arrival before the tour buses. The high-speed rail now reaches Datong from Beijing in around two hours, which has made the whole circuit far easier than it was a decade ago, when the train was slow and the road was worse.
The temple sits at the base of Hengshan, so you can pair the visit with a hike on the mountain if your knees agree. I would skip the mountain cable car and the upper temples unless you have a full day; the Hanging Temple itself is the reason you came.
Walking the temple
What the path is like
You enter from the bottom and climb a series of stacked galleries that cling to the rock, some no wider than a hallway, with railings and the occasional glass panel cut into the floor so you can see the ground far below. The route is one way, and the planks squeak and flex underfoot, which is unnerving the first time and fine the second. The interior halls are small and dim, with painted statues pressed into alcoves, and the whole loop takes maybe forty minutes if you let the crowd move you along. Photography is allowed but hard, because you are often shoulder to shoulder and the railings block the angle.
The timing problem
The temple opens early and fills by nine. The tour buses from Datong and the larger China circuits arrive in waves, and by ten the walkways are a slow shuffle. I went at seven thirty on a Tuesday in May and had the lower gallery nearly to myself for ten minutes, which is the version of the place you want. If you cannot go midweek, at least be first in line at opening.
Pairing it with the region
Northern Shanxi is a tight, rewarding circuit. Datong itself has the Yungang Grottoes, a few dozen caves of carved Buddhas that are among the best Buddhist art in the country, and the rebuilt city wall. Pingyao, two hours south, is the intact Ming-era trading town with its own wall, banks, and lanes. The three stops fill three days and give you cliff temples, cave art, and a walled city without doubling back. The Beijing hutongs and the Mount Hua plank walk make natural extensions if you are building a longer northern route, though Hua is a long way south in Shaanxi.
A practical visit table
| Stop | From Datong | Time needed | Note |
|---|---|---|---|
| Hanging Temple | 60 km, 1.5 hrs | Half day with travel | Go before 9 am |
| Yungang Grottoes | In Datong | 2-3 hours | Best in morning light |
| Datong city wall | In Datong | 1 hour | Walk or cycle the top |
| Pingyao old town | 2 hrs south | Overnight | Stay inside the wall |
| Hengshan hike | Same site | Half day extra | Optional, steep |
What it costs and when to go
Entry runs around 100 to 125 yuan with the Hengshan combo, and a separate fee applies if you want the upper mountain. Shanxi is cold and grey in winter, when the temple is quiet but the wind off the cliff is brutal, and hot in summer, when the midday sun bakes the rock and the line stretches. Spring and autumn are the sensible windows. The temple closes in high wind for safety, so check the weather and the park notice before you set out, because a closed temple halfway up the valley is a long wasted drive.
Photography and the ledges
The postcard shot is from across the valley on the road pullout, where the whole temple sits in the notch of rock with the cliff above and the gorge below. That frame is free and beats any inside shot, because the walkways are too cramped and the railings too close for a clean angle once you are on them. If you want the dramatic image, stop at the viewing point before you climb, shoot, then walk. Inside, the low light and the press of people make phone photos the pragmatic choice, and a small clip-on lens helps in the dim halls.
Children and anyone unsteady on their feet need a real talk before the climb. The railings are solid but the gaps are wide enough that a small child should be held, and the glass floor panels unsettle some adults. I saw one man freeze halfway and have to be talked down, which is embarrassing but common, so know your limits before you pay. The temple is not a place to test a fear of heights on the spot.
Quick facts
- What: a wooden temple on a cliff, ~491 AD, Northern Wei.
- Where: Hengshan, 60 km from Datong, Shanxi.
- Faiths: Buddhism, Taoism, Confucianism together.
- How: crossbeams set into the rock, cliff takes the load.
- Time: arrive before 9 am, weekday if possible.
- Pair with: Yungang Grottoes and Pingyao.
- Cost: about 100-125 yuan with the mountain combo.
Frequently asked questions
Is the Hanging Temple safe to walk?
The structure is maintained and the railings are solid, but the walkways are narrow and high, and anyone with a real fear of heights will find it hard. It is safe in the engineering sense; it is not comfortable if drops unsettle you.
How long do I need?
The temple loop is under an hour, but with travel from Datong and photos, budget a half day. Add the Hengshan hike only if you have a full day and good weather.
Can I combine it with Yungang in one day?
Yes, easily. Grottoes in the morning, Hanging Temple after lunch, back to Datong or on to Pingyao. A private driver makes the timing relaxed rather than rushed.
When is it closed?
It shuts in high wind and on rare maintenance days. Northern Shanxi wind is no joke in spring, so confirm the same morning you plan to go.
Is Datong worth a night?
For this circuit, yes. The grottoes and the city wall need a night, and the night-market food in Datong is a pleasant surprise after a day of temples.
Do I need a guide?
Not for the path, which is one way and signed. A guide helps with the faith history and the carving dates, but the felt experience needs no commentary.
What should I wear?
Sturdy shoes with grip, because the planks are worn and the cliff stairs are steep. Layers for the wind, and nothing loose that the gusts can whip against the rock.
Making the northern Shanxi circuit work
The Hanging Temple is the headline, but the region only pays off as a loop: grottoes, cliff, and walled town in three days, with Datong as the hub. If you want the drivers, the train timing, and the Pingyao stay booked in one sequence, send us your dates through the contact page and we will sketch a custom food-and-travel itinerary. The cliff is waiting, and the morning light will not.
Written by the ChinaTravelFood editorial team.
