So we left the story at Song Huizong. Huizong was as I wrote a consummate artist and a famous bon vivant. He knew how to enjoy himself. That means he generally wasn't interested in politics. Politics is generally very boring, pushing paper around, taking decisions about stuff you know nothing about. However Huizong was very willing to do politics if the topic at hand was interesting enough; interesting enough for such a consummate artist, that is.
There is one topic he did like to discuss, which was war. Artists tend to like war. The glory of fighting, thousands of men armed to the teeth and killing each other in mass pitched battles. There's something aesthetically very striking about that and artists across the world tend to be very attracted to it. Huizong was no exception, he was very much into war.
The thing is the Song dynasty had been founded explicitly as a peaceful state. The Song founder had decided the army was more trouble than it was worth, so he instituted a meritocratic bureaucracy and let it run the state more or less unimpeded for 100 years. That results in unprecedented prosperity, the reign of the 4th emperor Renzong being regarded as the historical peak of Chinese government. That produced its own set of problems, though. While you may not be interested in war, war is interested in you. While the Khitans in the Northeast were quite honorable, the Tanguts caught notice that the Song had no army to speak of, so they started to harass the border in order to extract more money. The Song had to keep 1 million soldiers in the frontier, which weren't easy to pay. And the tax revenue wasn't getting any better. The commercial economy grew with the typical effects: rich getting richer, using their wealth to buy tax exemptions, the poor getting poorer, rising in rebellion every few years.
Things started to change when Huizong's father, Shenzong ascended to the throne in 1068. The guy was 19 years old. If 3000 years of Chinese monarchy have produced any lesson, the lesson is that young monarchs are trouble. They always are. Young people are by definition inexperienced, so they tend to do stupid stuff. And generally, young men like to fight. They are eager to fight. It's in their blood. Sometimes that turns out well, as Han Wudi who basically tripled the territory of China in 30 years and crushed every single army around it. But usually young emperors pick fights without thinking, and the outcome is catastrophic.
News of the Khitan troubles got to China's capital. Our artist emperor was of course ecstatic. At last! We should take advantage of that. All the sycophantic ministers proposed making an alliance with the Jurchens. Let them take all the barbarian land they wanted, in exchange of the Song taking back the northern edge of the Chinese plain and the mountain passes. The Jurchens agreed, but stipulated that the Song had to take the land they wanted by themselves. The Jurchens weren't going to do the job for them. Thus a formal alliance was achieved.
The whole thing stunk. For better or worse, Song China and the Khitan Liao Dynasty had been in peace for 100 years. The Khitans could've kicked Chinese ass any time they wanted, but they respected the treaty. Now that the Khitans were in trouble, the Chinese didn't wait a minute in betraying the treaty and stabbing them in the back. That wasn't a very nice thing to do. It wasn't very smart either.
Nobody told Huizong that, though, who was still having fun playing soccer and visiting hookers through his secret tunnel. In 1121 He ordered his closest eunuch, Tong Guan, who is famous as the only bearded eunuch in Chinese history, to command 150,000 troops and go straight to the southern capital of the Khitans, what is today Beijing. The Khitans in their steppe homeland were running from the Jurchens as fast as they could; surely they wouldn't hold in the south very long either.
But the Chinese were still just no match for the Khitans. The Khitan commander in the south, Yelu Dashi, who was also perhaps the most incredible heroes in this story, held the walls, struck back at the Song forces, and destroyed the whole army. 150,000 men, gone. The whole Song army vanished in what was supposed to be a cakewalk. The eunuch commander panicked. He couldn't just go back and say he didn't take the land! They execute you for that stuff. So he sent an envoy to the Jurchens, saying: "Hey, we're having some trouble here conquering the city. Why don't you come down yourselves and take it, in exchange you can have all the booty: the gold, the women, the children, take them all. We'll pay for all supplies you need. After you're done you leave and we'll take the land as agreed, right?".
Well, why not. The Jurchens found it to be a good deal, so they came back through the mountain passes, and conquered Beijing in a week. Grabbed the gold and valuables, took the local women as concubines, took the children as slaves, sent them back to the Jin capital, close to today's Harbin. Just in case you don't know, Harbin isn't a very comfortable place.
It was probably colder back then, and at any rate it was a wooden village. No gas heating. All the virgins of Beijing were going to be enslaved there thanks to the ineptitude of the Song armies. Ineptitude that didn't go unnoticed by the Jurchen armies on the ground. Remember they were supposed to hand the land over to the Song authorities. The Jurchens started discussing among themselves. "This guys suck, they couldn't take a single city that took us a week". But the Jurchen emperor, Aguda, was a man of honor. "We had an agreement, we'll stand by it. I'm not the kind of man that takes advantage of the weakness of others".
But then he died.