Timeless Places

Hunyuan, Datong, Shanxi, China

Hanging Temple

★★★★☆

悬空寺 · Xuánkōng Sì

Forty small halls clinging to a cliff of Mount Heng, about fifty metres above a gorge, joined by plank walkways and propped on poles that look far too thin. It has hung there in one form or another for some fifteen hundred years, and inside it the Buddha, Laozi and Confucius share one hall.

iPhoto: Zhangzhugang, CC BY-SA 3.0, Wikimedia Commons

The story

Halfway up the western cliff of Jinlong Gorge, under Mount Heng, the northernmost of China's Five Sacred Mountains, a cluster of red-walled halls and grey-tiled roofs hangs on the rock face like a swallow's nest. There is no ground beneath it, only a drop of some fifty metres to the riverbed. Tradition dates the temple to the late Northern Wei dynasty (386–534), around 491; what you see today was largely rebuilt under the Ming (1368–1644) and Qing (1644–1912).

On screen here: Black Myth: Wukong, Xu Xiake's Travels — Diary of Mount Heng, The Smiling, Proud Wanderer (Xiào Ào Jiānghú) →

It was first called the Xuankong Pavilion, the "Pavilion of Mystery and Emptiness": xuan from Taoism, kong from Buddhism. Because the halls really do hang in the air, and because xuan sounds like the word for "hanging", the name drifted to Xuankong Si, the Hanging Temple. Its builders chose the spot well: the overhanging cliff keeps off rain and falling stone, and the mountain across the gorge blocks the sun for most of the day, which has kept the timber from rotting.

If you have one minute

Look up from the riverbed

Halls stacked on the cliff, 2006
Halls stacked on the cliff, 2006McKay Savage from London, UK, CC BY 2.0

Count the poles under the halls. They look as if they hold everything up, but most of the weight rests on something you cannot see: wooden beams driven deep into holes cut in the rock, a technique called "half-inserted flying beams". The poles steady the floors; some carry almost nothing. Local people sum it up in a rhyme: "The Hanging Temple, half up the sky, held by three horse-tail hairs."

Then find the hall at the top. Inside, a statue of the Buddha sits in the middle, with Laozi, founder of Taoism, on one side and Confucius on the other. Few temples in China bring the three teachings together under one roof.

Painted clay figures inside a hall, 2025
Painted clay figures inside a hall, 2025Dudva, CC0

Things people often get wrong

"It is held up by the poles." The beams in the rock carry most of the load; the poles were added and replaced over the centuries.

"It is all 1,500 years old." The site and the idea are; the timber you walk on is mostly from Ming and Qing repairs, and parts have been renewed in recent decades.

"It used to hang even higher." This is true: the river below has been dammed and the valley floor raised, so the drop beneath the temple was once greater.

Also among Daoist and Confucian temples: Qufu: Temple, Mansion and Cemetery, Jinci Temple, Wudang Mountains, Jongmyo Shrine, Wahuang Palace, Dosan Seowon.

Also among Buddhist temples and pagodas: Potala Palace, Sensō-ji, Tōdai-ji, Jokhang Temple, Bulguksa, Foguang Temple, all 29.

The story of the Hanging Temple: a temple hung on a cliff below the Northern Peak, why it was built so high, beams driven into the rock, the Buddha, Laozi and Confucius in one hall, Li Bai's extra dot and narrow walkways.8 chapters · about 5 min to read

Allow two hours, including the queue. The climb itself is a one-way loop through the temple and takes 20 to 30 minutes.

1. A temple hung on a cliff (491–1600)

A gorge below the Northern Peak

The Hanging Temple is in Hunyuan County, Shanxi, in the Golden Dragon Gorge below Mount Heng, the Northern Peak. Sheer cliffs line the gorge; halfway up the western one, Cuiping Peak, some forty halls and pavilions cling to the rock dozens of metres above the ground, seeming to hang in mid-air. Tradition dates it to the late Northern Wei, around 491, when the Wei capital was at nearby Datong; most of what you see was rebuilt under the Ming and Qing.

The temple on the cliff of Cuiping Peak, August 2013
The temple on the cliff of Cuiping Peak, August 2013Zhangzhugang, CC BY-SA 3.0

Why build so high?

Why on a cliff? Several reasons are given: the river in the gorge often flooded, so height kept the temple safe; the gorge was a busy north–south route, so a lofty temple was seen by every traveller; and monks prized seclusion — 'touching neither heaven above nor earth below'. Probably all of these.

The whole temple from the riverbed, 2017
The whole temple from the riverbed, 2017螺钉, CC BY-SA 4.0

Beams driven into the rock

How does it hang there? The secret is its beams. Craftsmen cut holes in the rock and drove thick timber crossbeams half into them, half projecting, then laid floors and built halls on top. The beams are said to be hardwood soaked in tung oil to resist insects and rot. The slender posts beneath, which look like the supports, mostly carry little load; the weight rests on beams anchored in the cliff. A local rhyme says the temple hangs 'halfway up the sky, dangling from three horsehairs'.

The halls and their thin poles, August 2013
The halls and their thin poles, August 2013Zhangzhugang, CC BY-SA 3.0

2. The Buddha, Laozi and Confucius under one roof (1600–now)

The Hall of Three Teachings

The temple's great peculiarity is that it honours Buddhism, Taoism and Confucianism together. At its highest point the Hall of Three Teachings seats Shakyamuni, Laozi and Confucius side by side. Temples of the three teachings combined are uncommon in China, and the three sages in one hall rarer still — a sign of the old Chinese tolerance and blending of faiths.

A statue in its red shrine, June 2025
A statue in its red shrine, June 2025Yumeto, CC BY-SA 4.0

Li Bai's extra dot

Carved on the cliff below are two large characters meaning 'magnificent', attributed by legend to the Tang poet Li Bai. Look closely and the first has an extra dot — added, the story goes, because the ordinary character wasn't grand enough for this place. Widely told, but there's no solid evidence Li Bai wrote them. The Ming traveller Xu Xiake visited too and called it 'a supreme spectacle under heaven' in his diary.

The temple from the path below, 2010
The temple from the path below, 2010Raffaele Nicolussi, CC BY 3.0

Narrow walkways

The halls are linked by narrow plank walkways, stairs and galleries, in places only wide enough to sidle through, boards flexing slightly underfoot over the drop. An overhanging rock above acts as an umbrella against rain and most of the sun — the temple gets only a few hours of sunshine a day, it's said, one reason its timber has lasted. In 2010 an American magazine named it one of the world's ten most precarious buildings. A dam now spans the gorge below, forming a reservoir, and visitor numbers inside are limited to protect the old structure.

Climbing the narrow stairs, 2010
Climbing the narrow stairs, 2010Raffaele Nicolussi, CC BY 3.0
The cliff, the temple and the reservoir, August 2013
The cliff, the temple and the reservoir, August 2013Zhangzhugang, CC BY-SA 3.0

Appendix: 1. The riverbed and the dam

The cliff, the temple and the reservoir, August 2013
The cliff, the temple and the reservoir, August 2013Zhangzhugang, CC BY-SA 3.0

Stand in the gorge first. The cliff is a tilted wall of limestone laid down in an ancient sea, its layers slanting up towards the sky. The temple sits in a shallow hollow of the rock, under an overhang. The dam just upstream was built in the 20th century to tame floods that once poured through Jinlong Gorge, the old road through the mountains.

2. The beams in the rock

The galleries seen from the side, 2012
The galleries seen from the side, 2012Nicor, CC BY-SA 3.0

Climb the stairs and look under the floors. Square timbers disappear into the cliff, each in its own socket. They are said to be of hemlock or pine soaked in tung oil against rot and insects; on the rock face you can also see ledges cut to take the halls' back walls. The whole complex is less than ten metres deep: some halls are barely wide enough for one statue and one visitor.

3. The plank walkways

A plank walkway between two halls, 2009
A plank walkway between two halls, 2009G41rn8, CC BY-SA 4.0

The halls are joined by narrow galleries and ladders. The way is one-way and often just wide enough for one person, which is why the number of climbers is now strictly limited. From the outer rail you look straight down the cliff to the riverbed. If heights frighten you, keep to the cliff side; the boards are solid.

Looking down from the temple to the gorge, 2008
Looking down from the temple to the gorge, 2008林高志, CC BY-SA 4.0

4. The Hall of the Three Teachings

A statue in its red shrine, June 2025
A statue in its red shrine, June 2025Yumeto, CC BY-SA 4.0

The temple holds some eighty statues in bronze, iron, clay and stone. Buddhist, Taoist and Confucian figures are spread through the halls, and at the top they meet in the Hall of the Three Teachings. In northern China after the Song (960–1279), the idea that "the three teachings are one" was popular among ordinary believers, and this hall is one of its clearest monuments. The Taoist immortal Lü Dongbin also has a statue here, which is why the 2026 animated film "Eight Immortals!" used the temple as a backdrop.

A weathered face in a painted niche, 2025
A weathered face in a painted niche, 2025Dudva, CC0

5. The carved words below the temple

The pavilion in memory of Xu Xiake, 2007
The pavilion in memory of Xu Xiake, 2007Gisling, CC BY-SA 4.0

Back on the ground, look for two large red characters cut into a rock: zhuang guan, "magnificent sight". The first has one dot too many. The story says Li Bai wrote them in 735 and added the dot because the ordinary character was not enough for what he felt. Nearby a small pavilion remembers Xu Xiake, who came in 1633 and left the most vivid description of the temple in old Chinese writing.

The temple and the same years elsewhere

When the first halls were pinned to this cliff, around 491, the Northern Wei court was about to move from nearby Datong to Luoyang, and in Constantinople Anastasius I had just become emperor. Monks in Cappadocia and on Mount Athos would later build monasteries on rock faces too, but the Meteora monasteries of Greece date only from the 14th century.

People who stood here

We searched Chinese sources first for this list, then English ones.

  • Xu Xiake (travel writer, 1587–1641)China's greatest traveller climbed Mount Heng in 1633 and wrote in his diary of the "storeyed halls hanging halfway up the western cliff, like a mirage of terraces", calling it the Hanging Temple. The words "the greatest sight under heaven" carved nearby are given in his name.

Tickets and travel info

Tickets and hours

  • Entry ticket 15 yuan (approx.); climbing ticket 100 yuan (approx.) on top. You need both to go up into the temple.
  • Since 1 April 2026 only 2,475 climbing tickets are sold a day (1,200 online, 1,275 at the window), and the number is to fall every year.
  • Open about 8:00 to 18:00 in the warm season; shorter in winter.
  • If climbing tickets are gone, the gorge and the view from below are still worth the trip, and a mixed-reality show below the cliff lets you "walk" through the halls.

Last checked 2026-11-12. Ticket rules from the scenic area's notice of March 2026 as reported by Shanxi Daily, Shanxi Evening News and Guangming Online; prices from CCTV (May 2026) and Trip.com. The official WeChat mini-program could not be opened from abroad..

Booking without WeChat

  • Official page in English Climbing tickets are sold on the scenic area's WeChat mini-program 北岳云游 (Beiyue Yunyou), up to seven days ahead, from 7:20 to 21:00 each day; it could not be opened from abroad.
  • International booking platform Local reports say visitors from outside mainland China are directed to Trip.com, using a passport.
  • Ticket window on site About 1,275 same-day climbing tickets a day are sold at the window of the Hengshan Visitor Centre: the morning batch from half an hour before opening (about 6:30), the afternoon batch from 12:00. People queue from before dawn in holidays.
  • Note All tickets are in your real name; bring your passport. Since June 2026 the mini-program asks each traveller in a booking to pass a face check.

Checked 2026-11-12

Find a guide

Once you've read our history and culture pages, a guide is the best way to go deeper and make the most of your visit. You can find guides on these sites:

Where to start

  • The temple is about 65 km south-east of Datong. Buses and tour cars leave from Datong; the Hengshan Visitor Centre is where tickets and shuttles start.
  • We'd suggest looking at the whole temple from the riverbed first, then climbing up. The morning light falls on the cliff before the mountain opposite casts it into shade.
  • It combines well with Mount Heng (the cable car is nearby) or with the Yingxian Wooden Pagoda on the way back to Datong.

Before you go

  • If you can, it's best to avoid July to September and national holidays, when the queues are longest; the 2026 film "Eight Immortals!" has made it busier still.
  • The walkways are narrow and high. Not for anyone with a strong fear of heights, and big bags are not allowed up.
  • Touts sell climbing tickets at several times the price; CCTV found some resold tickets passed the gate, but buying them risks being turned away.

Customs and manners

  • Please keep moving on the one-way route, as stopping for long photos on the walkways holds up everyone behind you.
  • Burn incense only where it is provided, at the foot of the cliff; open flames are not allowed in the wooden halls.

Book tickets

The official ticket channel here isn't open to international visitors, so please book through our partner sites below: we earn a small commission at no extra cost to you, and it helps keep Timeless Places running. Thank you for your support!

Looking for a place to stay nearby or a rental car? You'll find more options below.

Stay nearby

This button opens one of several booking sites, such as Booking.com, Expedia, Hotels.com, Agoda or Vrbo, picked automatically. If it isn't the one you'd like, just close it and click again. Thank you for your support!

Rent a car

Bring your own licence and an International Driving Permit, and check before you go that the country accepts them.

In the local language

悬空寺 Xuánkōng Sì

高德地图 Amap 百度地图 Baidu Google Maps Apple Maps

Opening hours are given in the local time of the place.

In pop culture

Video game · 2024

Black Myth: Wukong

Game Science (developer)

China's first big-budget action game, based on Journey to the West. More than twenty of its locations are modelled on old buildings in Shanxi, and one of its scenes is built on the Hanging Temple clinging to the cliff.

Same shot: On the plank walkways between the temple's two towers, looking down the cliff — the building the game scene copies.

Novel or literature · Ming dynasty (17th c.)

Xu Xiake's Travels — Diary of Mount Heng

Xu Xiake (travel writer)

The Ming (1368–1644) travel writer Xu Xiake, who spent some thirty years walking China's mountains, came to Mount Heng and the Hanging Temple. The Datong city guide quotes his verdict on the temple: “the greatest sight under heaven” (天下巨观), and sets it beside the word “magnificent” (壮观) that it attributes to Li Bai.

Same shot: On the plank walkway between the temple's two three-storey towers, looking down into the gorge below.

Novel or literature · 1967–69

The Smiling, Proud Wanderer (Xiào Ào Jiānghú)

Jin Yong (Louis Cha)

In Jin Yong's novel the Mount Heng School, one of the five sword schools of the Five Sacred Mountains, is a community of Buddhist nuns on this mountain, and the hero Linghu Chong, to everyone's surprise, ends up as its head. The Hanging Temple itself appears in the book: it is here that the Mute Granny seizes Linghu Chong and ties him up.

Same shot: Look up at the temple from the riverbed below, then climb the walkways and look down. A novel, so there is no film-still spot.

Meanwhile in the world

YearHereElsewhere
about 491The temple is built on the cliff (traditional date)Anastasius I becomes Byzantine emperor
494The Northern Wei moves its capital from Datong to LuoyangPope Gelasius I writes on the two powers of Church and State
1633Xu Xiake visits and describes the templeGalileo is tried by the Roman Inquisition
1982Listed as a national protected monumentSpain hosts the football World Cup
2010Time magazine names it one of the world's most precarious buildingsShanghai hosts the World Expo

One line to remember: a temple that has hung on a cliff for fifteen centuries, where three faiths share one room.

Local legends

These are stories people tell about this place. They are legends, not history, and each one says where it comes from.

LegendThe Taoist who asked for a temple in the sky

It is said that Kou Qianzhi, the Celestial Master of the Northern Wei court, left a last wish for a temple "that reaches up to the people of the clouds and cuts off the noise of the world below", and the Hanging Temple was built to fulfil it.

Source: Told in Hunyuan and in many Chinese guides; no Northern Wei text links Kou Qianzhi to this temple

LegendThree horse-tail hairs

The rhyme says the temple hangs "by three horse-tail hairs". Children are told that the builders hung it from the sky and the poles were added only to calm visitors' nerves.

Source: Local saying

Later, people who live here will be able to add the stories they grew up with, and say which of these they have heard.

Not certain, and where accounts conflict

Did Li Bai really write "Magnificent Sight"?
Guides give the year 735 and the extra dot as his signature of wonder, but no Tang source records Li Bai at Mount Heng or the Hanging Temple. The inscription may be a later carving made in his honour.
When was it built?
The date of about 491 comes from local tradition and later records; no Northern Wei inscription survives on the site. The present buildings are mostly Ming and Qing.

Look for these

  1. Under the floors, find a beam that goes straight into the rock.
  2. In the Hall of the Three Teachings, see who sits in the middle and who sits on each side.
  3. Find the extra dot in the carved word "magnificent" below the temple.
  4. From the top hall, look across the gorge for the road that once ran through it.

I am here

Stand at the site, sign in, press the button, and collect its stamp. Your browser will ask to use your location. It is sent to us once to confirm that you are at the site; we keep how far you were from it, not the spot where you stood.

Your stamps are saved to your account, so they follow you to any device. Checking from a browser cannot rule out every false location; stricter checks arrive with the app.

Share your photos

Photos here show the place, not people. Each one is credited to the visitor who took it and appears after our team has looked at it. A photo with you in it belongs under “I am here”.

Messages