How to book tickets to Mogao Grottoes
Tickets to Mogao Grottoes should be booked in advance and can be booked online on the official web site that is only in Chinese:
Official Web Site to Book tickets to Mogao Grottoes
If that isn't possible then advance tickets can be purchased from the ticket office on the east edge of Dunhuang. It is located on Yangguan Middle Road which is the major road to Dunhuang from the east. It's about a 10 minute walk from downtown Dunhuang and it's very easy to find.
How to get to Mogao Grottoes
Bus 12 to Mogao Grottoes leaves from Sanwei Road, about 50 m before it ends at Wen Chang Road going into Dunhuang, Map Location: 40.139966, 94.669269 .
The buses leave as soon as they are full and charge 3 CNY each way. The driver collects the money upon arrival. These are the same buses that go to the train station which is very near the Mogao Visitor Center.