Last updated 2026-10-07

Hanging Temple: The Cliff Temple of Hunyuan

The Hanging Temple, Xuankong Si in Chinese, clings to the west wall of a gorge in Hunyuan County, below Mount Heng and about 64 kilometres southeast of central Datong. Its halls and walkways are fixed to the rock on timber beams, and from the valley floor it looks as if it is hanging in mid-air, which is the obvious reading of the name. It is unusual in another way too. Buddhist, Daoist and Confucian figures share it, and the top hall seats the Buddha, Laozi and Confucius side by side. With the Yungang Grottoes, it is one of the two sights most people come to Datong for.

The red and yellow halls of the Hanging Temple fixed to a sheer cliff
The Hanging Temple, Hunyuan. Photo from Wikimedia Commons, by Charlie fong, CC BY-SA 4.0.

Origins

Nobody is sure when it was first built. The account most sources repeat dates it to 491 under Emperor Xiaowen of the Northern Wei, who is said to have wanted a new seat for the Daoist Celestial Masters of Kou Qianzhi. Chinese Wikipedia also records a story linking it to a road cut through the Heng range in 398, and English Wikipedia gives a legend of a single monk, Liaoran, beginning the work. The first name is said to have been Xuankong Ge, the Pavilion of Mystic Emptiness, and the character for mystic was later swapped for its homophone meaning hanging.

By the Jin dynasty it was already a temple of the three teachings. It was repaired under the Jin, the Ming and in the Qing Tongzhi reign, and the present buildings are mostly Ming and Qing.

How it stays up

Chinese Wikipedia describes 27 horizontal timber beams, about 50 centimetres thick and soaked in tung oil, set into sockets cut in the rock. They carry the halls and stick out about a metre to support the plank walkways. A dozen or so slender vertical posts stand under the buildings, but they are not the main support. A channel cut into the cliff above the temple carries falling stones away from the roofs, and the overhang of the cliff shelters the buildings from rain and the midday sun.

The temple faces east and runs north to south along the cliff, 40 rooms in all with about 152.5 square metres of floor. Behind the gate, a main hall on a stone base leads to two three-storey pavilions linked by walkways so narrow that one person passes at a time. The south pavilion holds, from bottom to top, the Chunyang Palace for the Daoist immortal Lü Dongbin, the Hall of the Three Officials and the Leiyin Hall for the Buddha. The north pavilion rises to the Hall of the Three Teachings.

The Hanging Temple's pavilions and walkways seen against the cliff face
Pavilions and walkways on the cliff. Photo from Wikimedia Commons, by Emmanuel Brunner, public domain.

Repairs and limits

Shanxi listed the temple as a provincial site in 1957 and the State Council as a national site in 1982. A major repair in 1978 replaced several main beams, and Chinese Wikipedia says this is when the hidden mortise joints holding the structure up were understood again. In 1991 the two characters zhuang guan, magnificent, traditionally attributed to the Tang poet Li Bai, were recut on the cliff below from a Qing rubbing. On 1 October 2015 a falling rock hit a roof ornament, and the temple closed for repairs to the channel above it; it reopened on 30 April 2016. Since 2001 the number of people allowed on the temple at one time has been capped at 80, which is why entry is metered and queues form.

Tickets and the climbing quota

There are two tickets. The scenic area's official site lists entry to the Hanging Temple area at 15 yuan, half price 8 yuan, and a separate climbing fee of 100 yuan, half price 50 yuan, for going up onto the temple itself. Since 1 January 2025 all tickets are sold at the Hengshan visitor centre, and everyone parks there and rides the shuttle bus to the temple.

Climbing tickets are limited. From 2 October 2026 the daily total stays at 2,475, of which 2,000 are sold online up to seven days ahead with face-recognition checks. They are released in two windows, from 07:20 to 18:00 on the day of booking and from 20:00 to 23:00 the evening before, with morning and afternoon climbing slots. The online quota includes 100 tickets a day for visitors from Hong Kong, Macau and Taiwan and foreign nationals, sold through Trip.com. The 475 tickets sold at the counter on the day are reserved for listed groups such as serving soldiers, disabled visitors and some students, and the notice says they do not include tickets for foreign visitors. In practice that means foreign travellers should book the climb on Trip.com before arriving. Each account can book one climbing order a week and two a month. Visitors aged 60 and over enter free but still need a zero-yuan climbing ticket.

Opening hours vary by season. Travel listings give about 08:00 to 17:00 from March to October and 08:30 to 16:30 from November to February, and during the 2026 National Day holiday checks ran from 07:00 to 18:00. Check the day's notice on the "Beiyue Yunyou" mini-program or the scenic area site.

Getting there

Hunyuan is a day trip. Drive or hire a car from Datong to the Hengshan visitor centre, then take the shuttle. The Yungang scenic area's direct buses list the Hengshan visitor centre among their stops, and tour buses from Datong often combine the temple with Mount Heng or the wooden pagoda at Yingxian. Mount Heng itself, with its own ticket and cable car, is covered in the Datong guide.

How long and when

The walk through the temple itself is short; the wait for your slot and the shuttle take longer. Allow half a day for the round trip from Datong, or a full day with Mount Heng. Morning light falls on the east-facing cliff, which is better for photographs. The walkways are narrow and the drop is real, so anyone uneasy with heights may prefer the view from below on the entry ticket. Weekends and holidays sell out.

Things to confirm before you go

  • A climbing ticket booked on the official channels or Trip.com.
  • The time slot, morning or afternoon.
  • Shuttle times from the visitor centre and back.
  • Whether you are comfortable on narrow walkways at height.

Frequently asked questions

How much does the Hanging Temple cost?

15 yuan to enter the area and 100 yuan to climb onto the temple, both listed on the scenic area's official site.

Can foreigners buy climbing tickets at the gate?

The October 2026 notice reserves on-site tickets for specific groups and says they exclude foreign visitors. Book online through Trip.com, which holds a daily quota for overseas visitors.

How far is it from Datong?

About 64 kilometres. Plan a half-day by car, or a full day with Mount Heng.

Is it scary?

The walkways are narrow and high. Most people manage, but the view from below is the alternative.

Sources

Facts in this article were checked against the following sources, retrieved 7 October 2026.

  1. 悬空寺, Chinese Wikipedia
  2. Hanging Temple, English Wikipedia
  3. Ticket information, Hengshan Scenic Area Management Centre
  4. Notice on online climbing ticket quota from 2 October 2026, Hengshan Scenic Area Management Centre
  5. Datong sites National Day 2026 opening times, ifeng

Photos are from Wikimedia Commons under the licences shown in each caption.