Given that I had a pretty good experience taking the overnight train from Bangkok to Chiang Mai, we decided to take the overnight train from Shanghai to Beijing. In general, I highly recommend the Seat61.com site for information on train travel. We booked seats in a 4-berth soft sleeper car. All together, our tickets were about $130 each, including booking fees and ridiculous things like currency conversion fees. Note that while the high-speed trains generally depart from Shanghai Hongqiao station, the overnight trains like the one that we took generally depart from the central Shanghai railway station.
When we booked our tickets, we didn’t get actual physical tickets. We were told that we had to pick those up at the station and to leave plenty of time to pick them up before our train. They weren’t kidding when they said to leave plenty of time to pick up the tickets.
To be fair, I don’t speak great Mandarin. I usually speak enough to get by, and I understand a fair amount. But even with my Mandarin skills, it took us quite a while to figure out that there’s a separate building APART from the train station where you pick up tickets. Essentially, if you’re facing the central Shanghai railway station, you need to go to your right until you hit an underpass in the road (at the end of the main train station building) which will lead you to a separate building. Go to the second floor of this building, and wait in one of the likely very long lines to get your tickets. If you want to reduce your stress levels, you might want to go to the train station before the day of your train to pick up your tickets so you don’t have any time pressure.
Anyway, once we got our tickets, the journey became a lot more pleasant. The train was air conditioned, decently clean, and relatively comfortable. The train was considerably newer and fancier than the train that I took from Bangkok to Chiang Mai.
The bedding was clean and comfortable. We ended up sharing our compartment with a Chinese woman and her daughter, so locals definitely take this train as well (as opposed to the essentially all-tourist train in Thailand).
The bathrooms were also decent. The sinks and toilets were regularly cleaned, there was soap and paper towels, and there were both western and squat toilets.
There’s also a dining car, which we did not partake in. Lots of people had brought on food (including ourselves), and for some reason, KFC was a popular option. You can also get hot water within the trains, so things like instant noodles or tea were also abundant.
Overall, I’d say that this overnight train was overall nicer/cleaner/more comfortable than the train I took in Thailand. I would definitely do it again, and it’s a great option for travelers on a budget because you don’t have to pay for lodging for that night.