China Travel › Train routes › Xi'an to Dunhuang by train

China Travel · Trains

Xi'an to Dunhuang by Train (2026): Times, Fares and Booking

Eleven hours on a daytime D train or one night on a sleeper, the two stations at the Xi'an end, and the 15-day booking window · Updated September 2026

Short answer

The fastest direct option is a daytime high-speed D train from Xi'an North Railway Station (西安北站) that spends roughly eleven hours on the move and lands at Dunhuang Station (敦煌站) in the evening. Conventional K, Z and T trains leave Xi'an Railway Station (西安站) in the city centre, take about 20 to 25 hours, and run overnight with real berths.

Dunhuang is a terminus, not a through stop. Every passenger train, high-speed included, arrives at the same building about 4.5 km from the town centre, on the side of town that faces the road south towards the Mogao Grottoes. Xi'an is the end where the station choice matters: high-speed trains leave the north station, conventional trains the central one.

Sales open 15 days before departure on 12306 and close about half an hour before the train leaves. Your passport is the ticket. Listing sites disagree about how many direct services run on a given date and the count shifts with the timetable, so confirm your date in the 12306 app before you build the rest of the trip around it.

The three ways to cover the route

Two of them are a single ticket. The third is a stopover on the Hexi Corridor, and on this line it is often the better trip rather than a compromise.

OptionLeaves fromTypical journey timeClasses sold
Direct high-speed D train Xi'an North Railway Station (西安北站) About 11 hours on the fastest listed departures Second class seat, first class seat
Direct conventional sleeper Xi'an Railway Station (西安站) Roughly 20 – 25 hours, overnight Soft sleeper, hard sleeper, hard seat
Two tickets with a stop at Lanzhou or Jiayuguan Xi'an North, then change on the corridor Jiayuguan South to Dunhuang is about 2.5 – 3 hours on the high-speed services Whatever the two legs sell

By Chinese standards this is a corridor run rather than a cross-country haul, but the last 169 km into Dunhuang is a branch line, and branch lines carry fewer trains than the trunk they hang off. That one fact explains why the overnight option takes longer than the map suggests and why the direct daytime service can be gone on a popular date while Beijing–Shanghai trains still have seats.

No wrong-station trap at the Dunhuang end Dunhuang Station (敦煌站) is the only passenger station serving the city, and it was built with platforms that take high-speed sets. Friends will tell you to check which station your train arrives at; there is only one, so that part of the planning is free.

Which station in Xi'an

Xi'an spreads its departures across two stations on opposite sides of the old city, roughly a 30 to 40 minute ride apart in traffic. Booking the wrong one is the single most common mistake on this route.

StationWhere it isTrains to Dunhuang
Xi'an North Railway Station (西安北站) North of the old city, the high-speed hub for the whole province The daytime D trains
Xi'an Railway Station (西安站) Central, just outside the old city wall on the north side The overnight Z, T and K sleepers

Both are on the metro network and both are busy from early morning. Read the station off the ticket before you arrange a taxi or book a hotel for the last night.

Xi'an is the hinge of the high-speed network west of Beijing, so most trips to Dunhuang start with a leg in from the east. The Beijing to Xi'an page covers the four-to-six-hour ride that gets you here. If you are coming from Sichuan instead, the western line is on the Xi'an to Chengdu page, and both routes end at Xi'an North.

What is outside the window

The corridor run is the reason to take the train rather than fly. West of Xi'an the line climbs through Tianshui and into Lanzhou, then turns north-west along the Hexi Corridor: a strip of farmland and oases between the Qilian Mountains on the left and desert on the right, with Zhangye and Jiayuguan strung along it. After Jiayuguan the green thins out, the line passes Liugou (柳沟) on the main Lanzhou–Xinjiang route, and the train swings on to the branch for the last stretch into Dunhuang.

On the daytime D train this fills the afternoon and gives you a Gobi sunset near the end. On the sleeper you wake up to it.

Dunhuang Station, and why the branch matters

The branch itself is worth knowing about, because it shapes what you can book. The Dunhuang railway runs 169 km from Liugou in Guazhou County on the main line to Dunhuang, and the first service ran in March 2006. The station building was designed in the manner of a desert caravanserai, with two platforms, and it handles the high-speed sets as well as the conventional trains.

A second line leaves Dunhuang towards Golmud, a 671 km route completed at the end of 2019, which ties the area into western Qinghai and Tibet instead of the east coast. Useful for through traffic, no help at all for a trip from Xi'an. What it means in practice: Dunhuang sits at the end of two branches, so the number of direct trains from any single eastern city stays small.

From the station it is a short taxi ride into town, and hosts in the guesthouse strips around the centre are used to arrivals off the evening train.

Seat classes that exist on this route

Nothing exotic here — the classes are the standard ones, described berth by berth on the seat and berth classes page.

ClassFound onWhat it gets you
Second class seatThe D trainsFive seats across, 3 + 2. The default and by far the most common ticket.
First class seatThe D trainsFour seats across, 2 + 2, more legroom. A quieter way to spend eleven hours.
Soft sleeperThe conventional K, Z and T trainsFour berths in a closed compartment with a door. The comfortable overnight choice.
Hard sleeperThe conventional trainsSix berths in an open bay, three on each side. Cheap, and perfectly usable for one night.
Hard seatThe conventional trainsA bench seat, sold cheap. Not a good trade for a 20-hour overnight leg.

A pattern worth noticing: on this corridor a second class seat on the high-speed service often comes out at or below the price of a soft sleeper on the conventional train of the same length, which is unusual. Compare the two options for your own date before assuming the sleeper is the budget pick.

Booking: 15 days, one passport, one exact name

  1. Get the name right the first timeSurname first, then given names, exactly as printed in the passport. A middle name that appears on the ticket but not the passport, or the reverse, stops you at the gate.
  2. Open sales 15 days outChina Railway releases tickets 15 days before the departure date and sells until roughly 30 minutes before the train leaves. Direct Dunhuang services are the ones that go first.
  3. Book on 12306 if you canIt is the official channel and the English site takes foreign passports after identity verification. The setup steps are on the 12306 English guide. Agents can book on your behalf for a fee, but they book on the same system and cannot create seats that are not there.
  4. Take the passport to the stationNo paper ticket is needed. The passport is scanned at the entrance, at the departure gate and sometimes again on the platform. Staffed lanes handle passports that will not read at a machine.
  5. Know the change rules before you payChanging and refunding a Chinese rail ticket is possible but has deadlines and fees attached, and they tighten close to departure — see the refund and change page.
Never treat a listed time as a live timetable Train numbers, departure times and the number of direct services on this route are reissued through the year. A figure on a booking blog, including one quoted on this page, describes the current pattern rather than the timetable for your date. The search results in the 12306 app are the version that counts.

Eleven hours on board

It is a long sitting, and it is a comfortable one if you plan for it.

If the direct train is full

The fallback is not a flight or a bus. It is buying the route in two pieces and spending a night in a town that is worth the stop.

Lanzhou is the practical break: every Dunhuang-bound service passes through it, and the high-speed leg from Xi'an is a short one. Jiayuguan is the scenic break — the fort there is the western end of the Ming wall, and the remaining hop to Dunhuang is only about 2.5 to 3 hours by high-speed train. Zhangye, with the Danxia landform outside town, sits between them.

Either way, two separate tickets on the same corridor are treated as two separate journeys: a delay on the first leg is not the railway's problem for the second, and neither is a missed connection. That is the price of flexibility here.

Frequently asked questions

How long is the train from Xi'an to Dunhuang?

The fastest listed direct high-speed D trains take about eleven hours from Xi'an North to Dunhuang. Conventional K, Z and T trains from Xi'an Railway Station are listed at roughly 20 to 25 hours. Both figures come from current route listings, which China Railway revises several times a year.

Is there a direct high-speed train from Xi'an to Dunhuang?

Yes, but only a small number of direct services. Listing sites quote one or two direct D trains a day and the count changes with the timetable. Search the 12306 app for your date rather than planning around a remembered service.

Which Xi'an station do trains to Dunhuang leave from?

It depends on the train. High-speed D trains leave from Xi'an North Railway Station (西安北站), north of the old city. Conventional K, Z and T trains leave from Xi'an Railway Station (西安站) in the centre, just outside the city wall. The ticket names the station and the two are not interchangeable.

Is an overnight sleeper available on this route?

Yes. Conventional K, Z and T trains run overnight from Xi'an Railway Station with soft sleeper, hard sleeper and hard seat. Listed journey times of roughly 20 to 25 hours make it one night on board, and it is the cheaper way to arrive with a bed.

Which station do I arrive at in Dunhuang?

Dunhuang Station (敦煌站), for every passenger train including the high-speed sets. It sits about 4.5 km from the town centre, between the main highway and the railway, on the side of town that faces the road south towards the Mogao Grottoes.

How far in advance can I book a Xi'an to Dunhuang ticket?

China Railway opens sales 15 days before departure, counting the departure date itself, and keeps them open until roughly 30 minutes before the train leaves, within daily service hours. On peak dates the direct services sell out early in that window.

What does a Xi'an to Dunhuang ticket cost?

Fares are set by distance and class and are adjusted when the tariff changes, so no figure on a third-party page should be treated as current. The exact price for your date and class is shown in the 12306 app or on the official channel at the moment you book.

Can I book with a foreign passport?

Yes. The English 12306 site and app accept foreign passports once identity verification is complete, and the passenger name has to match the passport exactly. The same passport is scanned at the station entrance and at the gate.

Is it worth breaking the journey at Lanzhou or Jiayuguan?

Often yes. It solves a sold-out direct train and it puts the Hexi Corridor stops in reach: Lanzhou for the Yellow River and the noodle houses, Zhangye for the Danxia landform, Jiayuguan for the Ming fort. The final hop, Jiayuguan South to Dunhuang, is about 2.5 to 3 hours on the high-speed services.

Train or flight from Xi'an to Dunhuang?

The train is a full day or a full night; a flight takes a couple of hours. Dunhuang has a small airport with a limited and partly seasonal schedule, so flight availability depends on the date. The daytime D train is the choice if you want the corridor scenery; the sleeper is the cheap one.

Related reading

Before the trip: the bag limits and the restricted-items list are on the luggage rules page, and if the corridor run makes you want more high-speed mileage in Sichuan, start with the Xi'an to Chengdu page.

Compiled from China Railway route listings for the Xi'an–Dunhuang corridor, the listed Dunhuang branch and Dunhuang–Golmud line references, Dunhuang Station information, and 12306 booking rules, cross-checked 30 September 2026. Direct services, journey times, fares and seat-class lists on this route are revised through the year, and the timetable in the 12306 app or on the official channel for your travel date is the authoritative version. Nothing here is a booking guarantee.