Mogao Caves, Library Cave

DunhuangChina 40° N · 94° E Updated Aug 2026

Cave 17 is a monk's memorial chapel barely 3m wide that hid 50,000 manuscripts for 900 years. It was found in 1900 — most now sit abroad.

Mogao Caves, Library Cave Photo: Zhangzhugang · CC BY-SA 4.0
Time needed
Half day (Digital Exhibition Center + timed cave tour)
Entry
Timed ticket via official channels only; Cave 96 is 5 RMB for Dunhuang residents on 四月初八
Best season
Spring or autumn — rain closes the site, as on 24 June and 29 July 2026

A Daoist priest hired sand-shovellers in the summer of 1900, and one of them leaned against a corridor wall that answered back hollow. Behind the plaster sat a bricked doorway, and behind that a chamber 2.6 by 2.7 metres — smaller than a single-car garage — packed to the ceiling with roughly 50,000 manuscripts nobody had touched in nine hundred years. That room is the Library Cave at the Mogao Caves, 25 km southeast of Dunhuang in China's Gansu corridor, and it holds the fullest surviving record of ordinary medieval Asian life anywhere on earth. Come for the gold-leaf Buddhas. Stay for the divorce settlements.

The first thing to understand is that Cave 17 has no door of its own. It's a hole cut into the north wall of the entrance passage of Cave 16, a much larger Tang cave — which means visitors queue to see the Library Cave while standing inside a different cave entirely, looking at a niche in its corridor. That's exactly why the concealment worked for so long. A bricked, plastered, painted wall reads as a wall.

What came out of it wasn't only scripture. Alongside Buddhist sutras came loan contracts, wills, tax registers, medical prescriptions, star charts, school exercises, dance notations, silk banners and embroideries, in Chinese, Tibetan, Sogdian, Khotanese, Uighur, Sanskrit, Old Turkic and even Hebrew — dated roughly between the 4th and 11th centuries. Most of what historians know about daily life in a medieval Chinese frontier town came out of this one small room. Nobody inventoried it before it was emptied, so the count of 50,000 is a reconstruction, not a tally.

Go in with the right expectations. The chamber today is bare except for the seated portrait statue, the lighting is dim by design, and your time inside is measured in seconds rather than minutes — the Dunhuang Academy caps daily visitor numbers because breath and body heat raise humidity, mobilize salt in the plaster and flake pigment off walls painted in the 6th century. Start at the Digital Exhibition Centre, where the films give you the detail the caves themselves can no longer afford to show you. Then walk the cliff. Roughly 45,000 m² of murals survive across 492 decorated caves here — enough painted wall to cover six football pitches, all of it cut and coloured by hand.

What to see

  1. Cave 17 — the Library Cave

    Cave 17 is not a cave you'd notice on your own. It opens off the north wall of Cave 16's corridor, a near-square room barely 3 metres high — about the footprint of a garden shed — walled up and painted over sometime in the early 11th century, for reasons nobody has settled. Inside sits Hong Bian, the monk who ran Buddhist affairs across the Hexi corridor after Zhang Yichao's 848 uprising ended Tibetan rule in Dunhuang; masons and modellers built this memorial hall for him between 851 and 862. Study the face. Dunhuang Academy conservators point to the brow ridge, the cheekbones, the corners of the eyes and mouth — a real skull under that clay, not a generic holy man. Then look past him at the two painted trees, where a water flask and a cloth bag hang from the branches. Someone hung their kit up. When the Daoist caretaker Wang Yuanlu broke through the wall in 1900, roughly 50,000 manuscripts came out of that shed-sized room: sutras, loan contracts, a star chart, divorce agreements, texts in Tibetan, Sogdian, Khotanese, Uyghur and Hebrew. Aurel Stein bought thousands and shipped them to London in 1907, Paul Pelliot took the pick of the rest to Paris the year after, and the collection stays split today between London, Paris, Beijing and St Petersburg. Scholars are still stitching it back together, scan by scan.
  2. Cave 96 and the Nine-Story Tower

    That red timber tower stacked against the cliff is the photograph everyone takes, and it's essentially a coat over the real thing. Behind the nine storeys stands a Maitreya Buddha 35.5 metres tall, first raised in 695 — the height of a twelve-storey block, seated. The cliff here is loose conglomerate, useless for fine carving, so the workers who made this hacked out a rough core, packed it with coarse mud, modelled the finer surface in hemp-fibre plaster and painted it: sculpture built up by hand rather than cut away. Stand at the feet and the head is a long way up, tilted forward. The eyes are engineered to meet yours from down there, and they do. Outside, the tower is vertical and public and made for the plaza; inside, the room compresses around you and you are the one being looked at. Walk the cliff base afterwards and watch for the rows of square holes punched into the rock face — anchor sockets for the wooden eaves, halls and plank walkways that once covered much of this frontage. Mogao was a monastery town clinging to a cliff, not a row of holes in a wall.
  3. How to work the site in half a day

    Every standard visit starts 15 km from the cliff, at the Digital Exhibition Center, with two films — Millennium Mogao and Dreaming Buddha Palaces — before a shuttle takes you out to the caves. From April to November you'll typically see eight caves with a guide; interpretation runs in Chinese, English, Japanese, French, German and Korean, and which eight you get is decided by rotation and humidity, not by request. No photography inside, at all, which is why the replica-cave galleries at the Conservation and Research Exhibition Center are the best part of the day for anyone who actually wants to look at detail rather than glimpse it. Ask about the special caves (特窟) at the ticket desk on the day — 158, 220, 254 and 275 among them — for a surcharge and a smaller group. Then cross to the stupa grove on the river terrace, where almost nobody goes. Come between December and March if you can: shorter opening hours, thinner crowds, and recent winters have opened more caves than summer does. Sandstorms and heavy rain close the cliff without warning in any season.

Plan your visit

Getting There
Every visit starts at the Digital Exhibition Center, 13-15 km east of town on the airport road — not at the cliff, which sits 25 km southeast and is reachable only by the site's own shuttle (15 min, included in your ticket). Taxi or DiDi from downtown costs ¥20-30 and takes 20-30 minutes; the ¥8 public shuttle boards outside Dunhuang Hotel roughly 07:30-15:00, timed to the film sessions rather than running turn-up-and-go. Drive straight to the caves and you'll find no ticket office waiting.
Opening Hours
As of 2026, peak season (1 April - 30 November) runs 08:00-18:00 with the last ticket check at 16:10; off-peak (1 December - 31 March) runs 09:00-17:00, last check 15:10. No fixed weekly closing day. Heavy rain and sandstorms suspend cave access outright — it happened on 24 June and again on 29 July 2026 — and unused tickets get refunded in full, so build a spare day into any Dunhuang plan.
Time Needed
Minimum door-to-door on the A ticket: about 3 hours 30 minutes — 30 min arriving before your slot, ~70 min of two digital films, 15 min on the shuttle, then 75 minutes to 2 hours through eight caves with a guide and headset. Five to six hours does it properly, adding the Mogao Grottoes Museum and a special cave or two bought on site afterwards. The stripped-down B ticket (four caves, no films) takes roughly two hours.
Cost & Booking
As of 2026 the A ticket runs ¥238 for domestic visitors and ¥258 with a foreign-language guide, covering eight caves, both films, shuttle and museum, capped at 6,000 people a day; the ¥100 B ticket is a salvage option, not a plan. Booking opens exactly 30 days ahead on mgk.org.cn or the 莫高窟参观预约网 mini-program, real-name, system live 07:00-22:00. Foreign passports usually can't finish the online flow — go through a registered agency, or queue at the Exhibition Center office by 07:30 with your original passport (photocopies get rejected) and cash.
Accessibility
The 492 caves stack five levels up a cliff face, strung together by exterior stairs, terraced walkways, narrow doorways and raised thresholds. Cave 17 opens off the corridor of Cave 16, up on an upper terrace — one of the harder stops on the route. The Exhibition Center is modern and step-free; the cliff isn't, and no lift or published step-free cave route exists. Disabled visitors pay ¥20 with valid ID and get the 爱心窗口 priority windows plus a green-channel lane, but call 4008-333-715 (08:30-16:30) first so staff can plan a route.

History

The Room That Was Probably Never a Library

Tradition dates the first cave here to 366 CE, when the travelling monk Le Zun stopped below this cliff at dusk, watched the setting sun set Sanwei Mountain blazing across the valley, and saw a thousand Buddhas in the light. He cut a cave on the spot; a second monk, Faliang, cut one beside him. The story survives in Li Junxiu's Fokan Ji, written under Wu Zetian, and on a stele in Cave 332 — which is to say it comes to us three centuries after the fact. An alternative text gives 353. Scholars treat the founding as a literary tradition rather than an archaeological fact: the earliest cave carrying a dated inscription is Cave 285, at 538–539.

For the next thousand years, quarrymen, plasterers, sculptors and painters — hired by merchant families, monastic officials and regional warlords, and almost none of them named in the record — chiselled and coloured their way along two kilometres of conglomerate cliff. Tibetan armies took Dunhuang around 781 and administered it for six decades, which is why thousands of Tibetan-language manuscripts came out of Cave 17. In 848, Zhang Yichao's fighters drove the Tibetan garrison out and founded the Guiyijun regime, loyal to a Tang court that barely existed anymore. That single year set up everything that follows.

The turning point

Hong Bian's Chapel, and the Man Who Broke Into It

Cave 17 wasn't built for books. Records show it was cut between 851 and 862 as a memorial chapel — a portrait hall — for the monk Hong Bian, whom the new Guiyijun government made Chief of Monks for the whole Hexi corridor after 848. Craftsmen carved him a seated portrait statue and painted the back wall behind it: two bodhi trees, a nun holding a fan, an attendant with a staff, and the detail almost every visitor walks past — a pilgrim's satchel and a water flask hanging from a branch.

Sometime in the early 11th century, someone carried Hong Bian's statue out, filled the empty chapel with bundled manuscripts, bricked the doorway shut, plastered it and painted over the plaster. Nothing inside dates later than about 1002. Then the room disappeared for nine hundred years, and Mogao itself faded with it once the Ming abandoned the overland Silk Road for sea trade. Neglect turned out to be the best conservation the site ever got.

Enter Wang Yuanlu — a Hubei famine refugee, ex-Qing soldier, ordained Daoist, and therefore a priest of the wrong religion squatting in the greatest Buddhist site in China. He arrived in the 1890s, begged alms from Dunhuang farmers, and spent years shovelling drift sand out of cave mouths. Chinese accounts give the date of the discovery as 22 June 1900. He had no salary, no institutional backing and no legal claim to anything he'd just found.

So he tried to give it away. He reported the find to the Dunhuang county magistrate, who reportedly dismissed the scrolls as old paper; he carried samples to the circuit intendant at Jiuquan; tradition holds he wrote to the Empress Dowager Cixi herself. No reply came — 1900 was the year the Eight-Nation Alliance marched on Beijing, and a collapsing dynasty had other problems. The turning point came seven years later, when Aurel Stein camped below the cliff and, unable to read a word of the manuscripts, presented himself as a devotee of Xuanzang, the pilgrim-monk Wang venerated. Stein's account says his secretary Jiang Xiaowan pulled sutras translated by Xuanzang out of the very first bundles. Wang read it as permission from the monk, and sold.

Why Was It Sealed?

Nobody knows, and the field is split. One camp, associated with Rong Xinjiang, reads it as an evacuation: the Karakhanid conquest of Buddhist Khotan around 1006 sent refugee monks and terrifying news east, and Dunhuang's monasteries hid what mattered. Another, argued by Fujieda Akira, says it was never a hiding place at all but a sacred waste deposit — superseded scrolls, duplicates and damaged sutras, which Buddhist practice forbids simply throwing away. The scrap and fragments support Fujieda. The intact silk paintings and fine embroideries don't. Both camps cite how neatly the bundles were wrapped.

Where It All Went

Stein left in 1907 with some 7,000 complete manuscripts and 6,000 fragments, reportedly for a donation of around 40 ingots of silver. Paul Pelliot followed in 1908 — the only buyer who could read everything on sight — then Japanese, Russian and American parties. Wang spent the money on the caves: clearing sand, repairing walkways, rebuilding the wooden facade. The manuscripts that stayed fared no better; when the Qing court finally ordered the remainder shipped to Beijing in 1910, officials pilfered the convoy en route, and scrolls were reportedly torn in half to make up the count. The collection today sits split between London, Paris, St Petersburg, Berlin, Tokyo and Beijing, and fragments of the same scroll still turn up on different continents. The International Dunhuang Programme reunites them digitally, because physically nobody expects it to happen.

Tips for visitors

  • You Can't Request Cave 17

    Caves are assigned by a rotation driven by CO₂ and microclimate sensors, so nobody chooses their eight — the Library Cave appears often but never on demand, and a 2017 visitor got a full route without it. If yours misses it, the Mogao Grottoes Museum near the cave area tells the whole sealed-archive story, Hong Bian's statue included.
  • Cameras Stay Pocketed

    Photography and video are banned inside every cave, flash or no flash — guides unlock each door, admit the group, then lock it again behind you. Shoot the cliff face, the red nine-story facade of Cave 96 and the walkways instead. Livestreaming, recorded broadcast and interviews anywhere on site need written permission first.
  • Fake Ticket Sellers

    On 18 July 2026 the Dunhuang Academy publicly warned about bots, hoarding and resale on Xianyu, Meituan, Douyin, Xiaohongshu, Taobao, Fliggy and Kuaishou. Only mgk.org.cn and the official WeChat mini-program are real channels; anything else risks a ticket that fails the name check at the gate — and it gets checked twice.
  • Pack A Jacket

    Cave interiors hold 15-20 °C all year while the Gobi outside can push past 40 °C in July, so you'll swing between desert glare and cellar chill a dozen times in two hours. Sun hat, sunglasses and high-SPF for the exposed terraces; closed shoes for the stairs and blown sand.
  • Ditch The Suitcase

    Large-luggage storage at the Digital Exhibition Center is free, which saves the day if you have an evening train from Liuyuan South. Suitcases 20 inches and over are banned from the cave zone outright, along with pets and drones.
  • Eat Back In Town

    Dining out at the caves means the Exhibition Center's 西遇餐厅 or nothing — desert, 25 km from the oasis. In town, Daji (达记驴肉黄面馆) does the city's signature donkey-meat yellow noodles for ¥15-20, Shazhou Night Market handles kebabs, roast pears and apricot-peel 杏皮水, and Green Lotus Vegetarian nearby feeds two for under US$20 if you want a break from mutton.
  • Dodge The Crush

    Avoid July through September, National Day (1-7 October) and early May, when the daily 6,000 cap vanishes fast. The small foreign-passport quota is the tightest of all — one July report had the 08:00 window sold out by 09:00, so arrive at 07:30.
  • The Eighth Day Crowd

    On 四月初八 of the lunar calendar, Buddha's Birthday, Dunhuang families come out to burn incense, eat and circle the passage behind the giant Maitreya in Cave 96 — a practice locals call 钻关. In 2026 residents paid ¥5 to enter Cave 96 that day. Expect tighter crowd control, parking limits and incense restrictions, and keep dress and voices modest around the shrine.

Frequently asked

Is the Mogao Caves Library Cave worth visiting?

Yes — though the Library Cave itself is a bare room barely 2.6 by 2.7 metres, about the size of a garden shed, and that's the point. Roughly 50,000 manuscripts came out of it in 1900: sutras in seven languages, plus loan contracts, divorce settlements and medical recipes that give us most of what we know about ordinary life in a medieval Silk Road town. You're looking at an empty niche in the corridor wall of Cave 16, and the emptiness does the work.

Can you choose to see Cave 17 at the Mogao Caves?

No — the Dunhuang Academy assigns caves by rotation, driven by CO₂ and humidity monitoring inside each chamber. Cave 17 is a frequent stop on the standard 8-cave route but never promised; one 2017 visitor got eight caves and not that one. If your route skips it, the Mogao Grottoes Museum and the Digital Library Cave exhibit cover the story with the Hong Bian statue's context.

How long do you need at the Mogao Caves?

Budget three and a half hours door-to-door from Dunhuang, five to six if you want to do it properly. The A ticket runs on a fixed clock: arrive at the Digital Exhibition Center 30 minutes early, two films (~60–70 min), 15-minute shuttle to the cliff, then 75 minutes to two hours of guided caves. Add an hour if you buy a special cave (特窟) at the interpretation desk afterwards.

How much does it cost to visit the Mogao Caves?

The full A ticket is ¥238 for domestic visitors and ¥258 with a foreign-language guide, covering both films, eight caves, the shuttle and the museum. The B ticket (¥100) drops the films and gives you four caves — a salvage option when A sells out, not a plan. Special caves cost ¥150–300 each, cash on site, and are never discounted.

How do I get to the Mogao Caves from Dunhuang?

Everyone starts at the Digital Exhibition Center, 13–15 km east of town, then rides the site's own shuttle 25 km southeast to the cliff — there's no other road in and no walking route. A taxi or DiDi to the DEC runs ¥20–30 and takes 20–30 minutes; the dedicated shuttle bus from outside Dunhuang Hotel costs about ¥8 but departs only every 30–60 minutes, timed to film sessions. Don't drive straight to the caves; the Academy says plainly that there's no ticket office there.

How do I book Mogao Caves tickets as a foreigner?

Either through a registered travel agency or in person at the ticket office inside the Digital Exhibition Center — the only window that serves passports. Bring the original passport (photocopies get rejected, it's scanned) and cash RMB, and be there by 07:30, because the foreign quota is small; one July report had tickets gone by 09:00. The WeChat booking mini-program opens 30 days ahead but generally wants a Chinese ID.

What is the best time to visit the Mogao Caves?

Winter and early spring, if you can take the cold — fewer people, more time per cave, and recent off-seasons have opened more caves than summer. Peak season runs 1 April to 30 November, 08:00–18:00 with last entry at 16:10; off-season is 09:00–17:00, last entry 15:10. Avoid July–September, 1–7 October and early May entirely, and keep a spare day in your Dunhuang plan since sandstorms and heavy rain close the caves outright with full refunds.

Can you take photos inside the Mogao Caves?

No — photography and video are banned inside every cave, flash or not, and guides enforce it as they unlock and relock each door. Shoot the exterior freely: the nine-storey red tower over Cave 96, the terraced walkways, the stupa grove across the river. Also bring a light jacket, since caves hold 15–20 °C while the Gobi outside can pass 40 °C, and leave suitcases 20 inches and over at the free DEC storage.

Sources & attribution 14

Built from cited sources · see the method · How we make our guides →

Photo credits (2)
  1. Lovesa Chang — Pexels License (https://www.pexels.com/license/) — Source: https://www.pexels.com/photo/33412586/
  2. Dunhuang Mogao Ku 2013.12.31 12-30-18 — Zhangzhugang — CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) — Source: https://commons.wikimedia.org/wiki/File:Dunhuang_Mogao_Ku_2013.12.31_12-30-18.jpg

Photos may have been resized or cropped.