Jin dynasty (1115–1234)
Rebellions in the north

Having usurped the throne, Wanyan Liang embarked on the program of legitimising his rule as an emperor of China. In 1153, he moved the empire's main capital from Huining Prefecture (south of present-day Harbin) to the former Liao capital, Yanjing (present-day Beijing). Four years later, in 1157, to emphasise the permanence of the move, he razed the nobles' residences in Huining Prefecture. Wanyan Liang also reconstructed the former Song capital, Bianjing (present-day Kaifeng), which had been sacked in 1127, making it the Jin's southern capital.

Wanyan Liang also tried to suppress dissent by killing Jurchen nobles, executing 155 princes. To fulfil his dream of becoming the ruler of all China, Wanyan Liang attacked the Southern Song dynasty in 1161. Meanwhile, two simultaneous rebellions erupted in Shangjing, at the Jurchens' former power base: led by Wanyan Liang's cousin, soon-to-be crowned Wanyan Yong, and the other of Khitan tribesmen. Wanyan Liang had to withdraw Jin troops from southern China to quell the uprisings. The Jin forces were defeated by Song forces in the Battle of Caishi and Battle of Tangdao. With a depleted military force, Wanyan Liang failed to make headway in his attempted invasion of the Southern Song dynasty. Finally he was assassinated by his own generals in December 1161, due to his defeats. His son and heir was also assassinated in the capital.

Although crowned in October, Wanyan Yong (Emperor Shizong) was not officially recognised as emperor until the murder of Wanyan Liang's heir. The Khitan uprising was not suppressed until 1164; their horses were confiscated so that the rebels had to take up farming. Other Khitan and Xi cavalry units had been incorporated into the Jin army. Because these internal uprisings had severely weakened the Jin's capacity to confront the Southern Song militarily, the Jin court under Emperor Shizong began negotiating for peace. The Treaty of Longxing was signed in 1164, ushering in more than 40 years of peace between the two empires.

In the early 1180s, Emperor Shizong instituted a restructuring of 200 meng'an units to remove tax abuses and help Jurchens. Communal farming was encouraged. The Jin Empire prospered and had a large surplus of grain in reserve. Although learned in Chinese classics, Emperor Shizong was also known as a promoter of Jurchen language and culture; during his reign, a number of Chinese classics were translated into Jurchen, the Imperial Jurchen Academy was founded, and the imperial examinations started to be offered in the Jurchen language. Emperor Shizong 's reign (1161–1189) was remembered by the posterity as the time of comparative peace and prosperity, and the emperor himself was compared to the mythological rulers Yao and Shun. Poor Jurchen families in the southern Routes (Daming and Shandong) Battalion and Company households tried to live the lifestyle of wealthy Jurchen families and avoid doing farming work by selling their own Jurchen daughters into slavery and renting their land to Han tenants. The Wealthy Jurchens feasted and drank and wore damask and silk. The History of Jin says that Emperor Shizong took note and attempted to halt these things in 1181.

Shizong's grandson, Emperor Zhangzong (r. 1189–1208), venerated Jurchen values, but he also immersed himself in Han Chinese culture and married an ethnic Han Chinese woman. The Taihe Code of law was promulgated in 1201 and was based mostly on the Tang Code. In 1207, the Southern Song dynasty attempted an invasion, but the Jin forces effectively repulsed them. In the peace agreement, the Song dynasty had to pay higher annual indemnities and behead Han Tuozhou, the leader of the hawkish faction in the Song imperial court.
punctuation:no_comma, startend:quotation, oulipo:avoid_letter[o]