Built into a steep rock wall beneath Mount Hengshan in northern Shanxi Province, the Hanging Temple is one of the most unusual religious structures in China. From the valley floor, the wooden halls appear suspended directly against the cliff, nearly 50 to 75 meters above the ground.
First-time visitors are often surprised by how compact the site feels up close. The experience is shaped less by scale and more by the relationship between architecture, geography, and religious history.
Known in Chinese as Xuankong Temple, this historic religious structure was first built during the late Northern Wei Dynasty, around 491 AD. Today, it remains the only known site in China where Buddhism, Taoism, and Confucianism are represented within the same mountain temple complex.
In 2010, Time magazine listed the cliff-built temple among the world’s most unusual buildings.
Why the Hanging Temple Feels Different From Other Temples in China
Unlike many large temple compounds in China, Xuankong Temple was constructed directly into the rock face beneath Cuiping Peak near Hunyuan County, Datong.
The structure extends horizontally across the cliff using narrow wooden passageways, elevated temple corridors, suspended pavilions, and steep staircases. From a distance, the ancient cliff temple appears almost weightless against the mountain.
Several factors make the site historically unusual:
- It has existed for more than 1,500 years
- It combines Buddhism, Taoism, and Confucianism in one location
- The wooden cliff structure relies on hidden support beams inserted into the rock
- The location was designed to reduce damage from rain, flooding, and falling stones
Why Was the Temple Built Into the Cliff?
At first glance, many people focus on how the hanging monastery stays attached to the mountain. Historically, the more important question was why this location was selected in the first place.
For monks during the Northern Wei period, mountains were associated with religious isolation and spiritual practice. Building monasteries away from cities created distance from political life and everyday distractions.
The structure was built beneath an inward-curving section of the cliff, which helped shield it from rain and falling rocks. The elevated position also protected the site from seasonal flooding.
The builders also understood the local rock conditions well.
The visible wooden pillars beneath the suspended temple often attract attention from visitors, but they are not the primary support system. The main structure depends on horizontal wooden beams inserted deep into the cliff wall.
Builders carved narrow openings into the rock and inserted hemlock beams reinforced with wedge-shaped joints. As pressure increased, the wedges tightened further inside the cliff. The support pillars visible today were added later, partly to stabilize aging sections and partly to reassure people uncomfortable with the height.

Why Three Different Traditions Share the Same Temple
One of the most distinctive aspects of Xuankong Temple is its combination of Buddhism, Taoism, and Confucianism within the same structure.
For international travelers unfamiliar with Chinese religious history, this arrangement may initially seem unusual. In China, however, these traditions often coexisted rather than functioning as strictly separate systems.
Buddhism focused largely on spiritual salvation and the cycle of life and death.
Taoism emphasized harmony between humans and the natural world.
Confucianism centered on ethics, education, and social order.
Rather than competing directly, these traditions frequently shaped different parts of daily life at the same time. A person could follow Confucian principles within society, practice Taoist ideas about nature, and still participate in Buddhist rituals.
Inside the cliffside monastery, visitors can see statues of Confucius, Laozi, and Sakyamuni Buddha within the same hall. This reflects a broader pattern in Chinese history where practical coexistence was often considered more important than strict religious separation.

Getting to the Hanging Temple From Datong
Most travelers reach Datong first before continuing south toward the suspended religious site.
Reaching Datong
By High-Speed Train
Datong is connected to major Chinese cities through the high-speed rail network.
| Route | Approximate Time |
|---|---|
| Beijing → Datong | 1 hour 50 minutes – 2 hours |
| Taiyuan → Datong | Around 2.5 hours |
| Xi’an → Datong | Around 6 hours |
By Air
Datong Yungang Airport offers flights from cities including Beijing, Shanghai, Chengdu, and Xi’an.
By Long-Distance Bus
Buses from Beijing to Datong usually take around 3.5–4 hours.
From Datong City to the Temple Area
The mountain temple complex is approximately 70–80 kilometers from central Datong.
Private Car or Driver
This is usually the simplest option for international visitors.
The drive takes around 1.5 hours each way. Drivers can stop near the pedestrian entrance or at the visitor center shuttle area.
Because transportation between Datong, Hunyuan, and nearby historical sites can involve multiple transfers, some travelers prefer arranging transportation in advance, especially when visiting several locations in one day.
This is one of the more common planning questions FoyoChinaTrip helps explain when organizing customized Shanxi itineraries.
Public Transportation
Travelers can also take a bus from Datong East Coach Station to Hunyuan County.
After arriving in Hunyuan, visitors usually transfer to a shuttle bus or taxi for the final section to the exterior viewpoint area.
The full journey normally takes around 2 hours or slightly longer depending on connections.
Should You Climb the Hanging Temple or View It From Below?
Both options provide different ways to understand the site.
Some travelers prefer walking through the elevated section itself, while others prefer viewing the structure from the valley-floor perspective, where the relationship between the buildings and the cliff is easier to see.
Walking Through the Suspended Corridors
The interior route is narrow and mostly one-way. In several sections, only one person can pass comfortably at a time.
The staircases are steep, and the suspended walkways can feel exposed when crowded. The low railings make the surrounding height feel much closer than it appears in photos.
The elevated route itself is relatively short. Most visitors complete the upper corridor access area within 10–20 minutes, not including queue time.
Inside the structure, visitors can enter halls such as:
- Sanjiao Hall
- Leiyin Hall
- Guanyin Hall
Many of the painted sculptures and statues date to later dynasties, especially the Ming period.
Who May Want to Skip the Elevated Route
The interior route may feel uncomfortable for:
- Young children
- Elderly travelers with mobility limitations
- Travelers with severe fear of heights
- Visitors with heart conditions
Upper-level access tickets are also limited daily, and queues during holidays can exceed 1–2 hours.
There are no restrooms or resting areas inside the elevated section, so most visitors prepare before entering.
Viewing the Temple Without Going Inside
Some travelers choose not to enter the suspended structure itself.
In practice, the hanging monastery is often easiest to understand visually from a distance. The panoramic viewing area across the valley allows visitors to see how the entire wooden cliff structure fits into the rock wall.
This option works well for:
- Travelers with limited time
- Visitors uncomfortable with heights
- Wheelchair users
- Older travelers
Ground-level visits usually take around 20–30 minutes.
Best Places for Photos
Popular viewing areas include:
- The panoramic viewing area across the valley
- The stone inscription area beneath the structure
- The pavilion area below the cliff
These locations provide a clearer distant structural view than the elevated walkways themselves.
When Is the Best Time to Visit?
The most comfortable periods are usually:
- March to mid-June
- September to November
During these months, temperatures are moderate and visitor numbers are generally lower than during summer holidays.
Winter offers a quieter atmosphere and clearer visibility of the cliff-built structure, especially after snowfall. However, temperatures in Datong frequently fall below -10°C.
July and August are typically the busiest months because of summer vacation travel and seasonal rainfall.
Morning vs Late Afternoon
Some travelers arrive early in the morning to reduce queue times for the elevated route.
Morning visits usually provide cooler temperatures and shorter lines.
Late afternoon often creates softer light on the cliff walls, although parts of the suspended temple may fall into shadow earlier because of the mountain position.
Tickets, Queues, and Entry Rules
The exterior viewing ticket and upper-level access ticket are separate.
Ground-level tickets are usually easier to purchase on site. Tickets for the elevated interior route are significantly more limited and may sell out during busy periods.
Some visitors reserve through the official Hengshan Scenic Area WeChat account, while others arrange access through travel agencies.
Foreign visitors should carry passports for ticket checks and entrance verification.
What to Wear and Bring
Most visitors find the elevated route more comfortable with light luggage and stable footwear.
Recommended Items
- Comfortable non-slip walking shoes
- Small backpack
- Water and light snacks
- Sun protection during warmer months
- Warm outerwear in winter
Because the wooden passageways are narrow, carrying large bags is not recommended.
Easy Day Trip Ideas From Datong
Option 1 — Yungang Grottoes and Hanging Temple
Morning:
Visit the Yungang Grottoes
Afternoon:
Continue to Xuankong Temple
This route works well because both sites are connected to the Northern Wei period and reflect different forms of religious architecture from the same historical era.
Option 2 — Hanging Temple and Yingxian Wooden Pagoda
Morning:
Visit the suspended temple early to avoid crowds
Afternoon:
Continue to Yingxian Wooden Pagoda
This route focuses more heavily on traditional wooden architecture and engineering history.
Other Places to Visit Near the Hanging Temple
| Attraction | Approximate Distance | Main Feature |
|---|---|---|
| Mount Hengshan | 4 km | One of China’s Five Great Mountains |
| Yingxian Wooden Pagoda | Around 1 hour | Oldest and tallest surviving wooden pagoda |
| Yungang Grottoes | Around 1.5 hours | UNESCO Buddhist cave complex |
| Huayan Temple | Datong city area | Liao Dynasty Buddhist architecture |
Where to Stay for a Hanging Temple Visit
Hunyuan County
Staying near the site allows earlier access in the morning, which can help reduce waiting times.
Accommodation options, however, are relatively limited.
Datong City
Most international travelers choose to stay in Datong.
The city offers a wider range of hotels, restaurants, and transportation connections. It is also more convenient for visiting Yungang Grottoes, Huayan Temple, and other historical sites in the region.
Visiting the Hanging Temple With Less Uncertainty
For many international visitors, the more complicated part of visiting Xuankong Temple is usually not the site itself, but understanding transportation timing, ticket availability, and how nearby destinations connect within the same trip.
Because Shanxi’s major historical sites are spread across different counties, some travelers prefer slower itineraries with fewer transfers and more predictable travel days.
This is also why customized routes are relatively common for travelers visiting Datong, Yingxian, Pingyao, and Xi’an within the same journey.
When discussing Shanxi itineraries with travelers, FoyoChinaTrip usually focuses less on adding more destinations and more on helping visitors understand travel pace, regional distances, and how different historical sites connect culturally across northern China.
FAQ
How far is the Hanging Temple from Datong?
Xuankong Temple is located about 70–80 kilometers southeast of central Datong in Hunyuan County. Driving usually takes around 1.5 hours, while public transportation may take longer because of transfers between buses and shuttle services.
Do I need a separate ticket to enter the upper walkways?
Yes. The exterior viewing ticket and elevated route access ticket are separate. Tickets for the suspended interior section are limited daily and may sell out earlier during weekends, holidays, and peak travel seasons.
Is the Hanging Temple suitable for people afraid of heights?
The valley-floor viewing area is generally comfortable for most visitors. The elevated wooden passageways inside the cliff-built structure are narrow, steep, and exposed, which may feel stressful for travelers uncomfortable with heights.
Why hasn’t the Hanging Temple collapsed after 1,500 years?
The suspended structure relies mainly on wooden beams inserted deep into the cliff wall rather than the visible support pillars below. Its inward-curving location also helps reduce damage from rain, wind, sunlight, and seasonal flooding.


