The usual overland route from Europe into China is the Trans-Siberian Railway, crossing Russia to Lake Baikal then travelling either via Mongolia or Dongbei (the former Manchuria) to Beijing. However, a less-travelled but equally fascinating itinerary runs from Moscow in Russia to Urumqi in China via Kazakhstan. This route is not so well-travelled or documented, so it demands more research and preparation, but gets you further off the tourist beat.
See also: Rail travel in Russia
This is not a trip where you can wing it. You need to sort three things in advance: the language (at least three), visas (at least two), and trains.
How much can you organise yourself, and what do you need an agency to help with? It depends on your language & business skills and sheer dogged perseverance, but you'll probably find it straightforward (in English) to book accommodation and trains within Russia and across Kazakhstan. Since the visa process has been outsourced, you probably need the help of a visa-support agency to get your visa (in UK the brand leader is Real Russia), and they can also help with the Kazakh-China trains. Once into China it gets easier again.
Accommodation must be booked in advance to support your visa applications. This is the easiest part to plan because there's a wide range available, bookable by internet in your own language and currency in the standard way. See "Sleep" listings for the preferred stopover cities along your route. But you can't book until you've sorted the trains. Beware also that some small hotels and hostels in China do not honour bookings made by westerners, no matter what documentation you wave at them. Pick those whose website looks westerner-friendly, and where recent guest reviews give you confidence.
Trains likewise must be booked in advance to support your visa applications. Not only are they your accommodation for some six or seven nights, but they are also evidence of how you plan to get in and out of the country, instead of a plane ticket. Prior booking also avoids you trying to negotiate at a crowded ticket window in your limited Russian or whatever.
The most difficult part to sort out is the final leg from Kazakhstan across the border to Ürümqi. There are only two trains a week; one of those two may not run; the booking horizon is short; and the Kazakh Railways website doesn't accept western payment cards. Also, tickets to Ürümqi are only issued if you have a valid Chinese visa, but in order to get that visa you need to show a train booking . . . who said that the Golden Age of grand railway journeys was dead? So what this means is that you need to figure out this final leg first, then all the other railway connections and city stopovers fall into place. Then be ready to book everything just ahead of applying for your visas. At this point your passport becomes unavailable for 2-3 weeks, so your other travel plans are compromised.
See under "Trains" below for details, but the one that is pretty sure to run is the Kazakh train (#14ts) which leaves Almaty-2 shortly after midnight, Saturday gone, Sunday come. It runs north via Almaty-1 overnight to Aktogai, where it combines with the train from Nur-Sultan (Astana) and Karaganda. It now turns east to Dostyk, crosses the border with long waits either side, and continues east to reach Ürümqi by 10:20 on Monday. Coming back, train #13ts leaves Ürümqi Main Station after 23:00 on Monday, to reach Aktogai around 18:00 Tuesday. Here it divides, the front portion continuing via Karaganda to Nur-Sultan for Moscow, while the rear portion goes south to reach Almaty by 06:00 Wednesday.
So this is the better route from Moscow via Nur-Sultan, but from Almaty it's a zigzag taking 30 hours. A second, more direct Chinese train may run (and still ran as of Oct 2019) from Almaty via Khorgos, taking 24 hours. It leaves Almaty-2 at 08:30 Monday, reaching the border that evening and Urumqi by 10:20 Tuesday. No timetable is available for the westbound run, but it's believed to leave Ürümqi Main Station around 23:00 Saturday to reach Almaty-2 very early on Monday, there to turnaround and become the eastbound 08:30.
After all that, booking trains in Russia is comparatively easy. See Russian train travel, and much of the general advice on the Trans-Siberian Express page is relevant. (For example, which station in Moscow does your train depart from? There's quite a choice.) Useful websites include poezda and Russian Railways.
This will be the most vexing part of your preparations. Most western travellers (ie on European, UK, US or Canadian passports) need at least two visas in advance, for Russia and for China, but it could work out at 3 or 4. It's either impractical or impossible to get these along the way. Consular processing time may be much longer than you can stop over. They might be prepared to issue a visa to a resident foreigner - eg the Chinese Embassy in Kazakhstan would grant a Chinese visa to a US citizen residing there to teach English - but not to someone passing through c/o the flophouse hostel.
If you travel overland from western Europe to start this itinerary in Moscow, the simplest route is via Germany, Poland and Belarus. You'd therefore need a Belarus transit visa - which must be valid for double-transit if you return the same way. This allows 48 hours to pass through the country, adequate for transit but not for stop-over. If you do want a stop-over (and Minsk is fascinating) then get a Belarus tourist visa. Although there are sometimes alarming rumours about barriers at the Russian border, through-travel along this route has for some years been trouble-free (as of autumn 2019). Problems may arise if you fly into Belarus and take the train east, because the visa regimes differ for the air and land borders. Routes avoiding Belarus, via Ukraine or Scandinavia, add more bother than they save.
You need a tourist visa for Russia. Journey times are long across this vast country, and you surely want to see some of the cities along the route, so a transit visa isn't suitable. If you return the same way, it needs to be a double-entry visa: this has the same application form and processing time but higher fee, and much more rigour over supporting documentation. One common train route into Kazakhstan, described below, re-crosses for a few minutes back into Russia before trundling on east across Kazakhstan. Border procedures ignore this, so you don't need an extra entry validity.
You don't need a visa to visit Kazakhstan for up to 30 days. This visa waiver was extended piecemeal several times, but since 2018 has been made permanent.
For the other Stans, you don't need a visa for Kyrgyzstan for visits of up to 60 days. This is not far off your route so Bishkek and Issyk Kul are a simple side-trip, especially if you'd planned some days slack because of uncertainty over the days of running of the Urumqi trains at the time you committed to the trip. US citizens still need a visa for Uzbekistan but most other westerners don't: Samarkand and Bukhara are fabulous, but they take you a long way off the natural Moscow-Urumqi routes. Visas are still required, and are a hassle to obtain, for Tajikistan and Turkmenistan, which lie even further off-route: "stan-bagging" is a whole separate project.
You need a tourist visa for China. Their standard issue is a multi-entry visa valid for two years, so side-trips eg to Hong Kong don't create extra hassle. They will want to see complete documentation not just of your trip within China, but the total itinerary from leaving your home country to returning there. The problem of needing a visa to buy a train ticket into China, yet needing a ticket to get a visa, can be resolved by the visa support agency - in effect they hold your passport "in escrow" to sort both. Another approach is to get your visa for some simpler trip to China then re-use it for the Moscow-Urumqi route: after all, you can never see the whole of China on a single trip.
In all these countries, you may have to register on arrival, and again if your stay exceeds five days. Your accommodation will usually do this for you.
The route from Moscow to Ürümqi, without any side-trips or stop-overs, involves a direct train to Nur-Sultan (Astana) or change of trains to Almaty, then a final train onward to Ürümqi. Pros & cons:
For Nur-Sultan: The direct train east from Moscow runs every second day, even dates. Train 84 leaves Moscow Kazan station at 22:48 and arrives in Nur-Sultan 54 hours later at 08:00. Return train 83 (likewise even dates) leaves Nur-Sultan at 11:10, arriving Moscow at 15:30 after two nights aboard.
The route to Nur-Sultan from Moscow Kazan 📍 goes east through several interesting Russian cities, notably Ryazan 📍, Samara 📍, Ufa 📍 and Chelyabinsk 📍. After 40 hours you reach the Kazakh border at Petukhovo / Mamlyutka 📍. The first city in Kazakhstan is Petropavlovsk 📍, and the train then heads south across the steppes to the capital Nur-Sultan 📍. This train continues south to Karaganda, which has connections to Almaty and Ürümqi, but Nur-Sultan is much the better place to stopover or change trains.
For Almaty: the direct train from Moscow has been axed. Either travel to Nur-Sultan as above then take the 13-hour train down to Almaty; or change at Saratov. There are frequent trains between Moscow Pavletsky 📍 via Tambov 📍 to Saratov 📍, taking 16 hours. The onward cross-border train runs on even dates and takes 53 hours, south as Train 8 from Saratov around 19:30 reaching Almaty by 13:00 two days later, and north as Train 7 from Almaty at 01:30 to reach Saratov around 14:00 two days later. Southbound from Saratov, the train crosses the Volga river, and reaches the Kazakh border at Ozinki 📍, about 24 hours from Moscow. The first stop in Kazakhstan is Uralsk, also known as Oral 📍. The train heads east and, by a quirk of the border, crosses back into Russia for an hour - border procedures ignore this. Then back into Kazakhstan and east to Aktobe 📍 then (about 48 hours from Moscow) turning southwest passing near the former Aral Sea. You're now on the historic Silk Road across the desert, and notable stops include the ancient city of Turkestan 📍 and Kazakhstan's third city Shymkent 📍. (Change at Shymkent for side-trips to Tashkent in Uzbekistan, or to Bishkek in Kyrgyzstan). One more night on the train brings you to Almaty 📍 around 13:00. Don't jump off by mistake at Almaty-1 station on the north edge of the city! Stay aboard to the downtown terminus of Almaty-2, near accommodation and sights.
The Trans-Siberian Railway used to run via Petropavlovsk, but has been diverted north to avoid exiting and re-entering Russia. You can explore a long stretch of it without straying too far from your route towards Nur-Sultan. See main Trans-Siberian article, but excellent destinations along the way are Nizhny Novgorod, Kazan and Yekaterinburg. Agreeable Omsk is the most easterly you can sensibly venture, with a six hour back-track to Petropavlovsk.
To explore more of Central Asia, you can also take direct trains from Moscow for example to Bishkek or Tashkent, and reach Almaty by bus or train.
There are two main railway stations in Nur-Sultan - check for current info on which one your train is using.
Eastbound: Two trains cross the border - probably. The one which is surest to run is the Kazakh train, a dilapidated ex-Soviet affair with 4-berth sleepers. From Nur-Sultan, Train #54ts departs on Saturday at 16:45 and runs via to Karaganda 📍 to Aktogai. Meanwhile from Almaty-2 station, Train #14ts leaves shortly after midnight, Saturday gone, Sunday come, and runs north to Almaty-1 then overnight to Aktogai. The trains meet at Aktogai towards noon and are coupled together. The combined train turns east to Dostyk, and sits there for 3-4 hours for Kazakh border exit procedures and change of bogies from Russian to Chinese railway gauge - you have to get off for all this. Then it crosses the border late evening at Alashankou 📍, with a two-hour time-zone switch and another lengthy wait off the train. Finally around midnight it continues east to reach Urumqi 📍 by 10:20 on Monday.
So this is the better route from Moscow via Nur-Sultan, but from Almaty it's a zigzag taking 30 hours. There's a more direct train from Almaty via Khorgos, taking only 24 hours. This is a Chinese train, with modern, comfy sleeping cars. This route opened in summer 2017 to great fanfare, then was ever-so-quietly axed a few weeks later. In 2018 and 2019 it's running again, virtually empty because no-one knows about it, and there's no saying whether it will continue. This train (#103ts) starts from Almaty-2 at 08:30 on Monday, reaching the border at Khorgos 📍 that evening. Kazakh exit, bogie change and Chinese entry take several hours, then it's onward (now badged as Train K9790) to reach Urumqi by 10:20 on Tuesday.
Westbound: The Kazakh train (#13ts, but shown as K9797 on Chinese departure boards) leaves Urumqi shortly after 23:00 on Monday. It reaches the border around 07:00, spends several hours either side, then comes into Aktogai around 18:00. Here it divides, with the front portion reaching Nur-Sultan around 12:30 on Wednesday. The rear portion goes south, arriving at Almaty-1 for 05:30 and Almaty-2 for 06:00 on Wednesday.
The westbound Chinese train departs Urumqi around 23:00 Saturday, taking 24 hours via Khorgos to arrive Almaty-2 near midnight Sunday; there it turns around to become the 08:30 eastbound to Urumqi.
All international trains use Ürümqi Main Railway Station, aka "Wulumuchi", 20 km northwest of Ürümqi city centre. So too do the long-distance fast trains to Lanzhou, Beijing, Xian and Wuhan. Some western timetables, tickets and travel agents refer to "Wulumuchi Nan" or "South Station" but this is out of date: nowadays the south station has only local & regional services, and the long-distance trains don't call there.
Since you've gone to all the bother of getting a Chinese visa and getting in to Ürümqi, you probably want to explore more of the country. And you pretty much have all of China ahead of you - but not entirely, because there's a lot of it already behind you. The western tip of China is actually further west than Lahore in Pakistan! So one option is to backtrack west to Kashgar on the old Silk Road, by train or bus. Seek advice before planning to go even further west into Kyrgyzstan or south down the Karakoram Highway into Pakistan: the mountain passes are difficult in summer and snowbound in winter.
Most itineraries go east to Lanzhou: frequent high speed trains take 11 hours from Ürümqi. Here the options fan out: to Xian with its famous Terracotta Army (3 hours from Lanzhou, an easy day-trip), and to Beijing with connections to Shanghai or Guangzhou (for Hong Kong and Macau).