The ancestral motto of "do not kill literati" was a rule set by Song Taizu Zhao Kuangyin, which is related to the Song Dynasty's policy of emphasizing literature over military affairs.
It is said that in the early years of the Northern Song Dynasty, there was a Hanlin scholar named Tao Gu who worked beside Taizu in drafting various documents and announcements. As time went by, he thought he had merit, so he asked Taizu for a high-ranking official position. Unexpectedly, Taizu of the Song Dynasty believed that "the proclamation drafted by Hanlin scholars is nothing more than referring to the old version of the predecessors, and only changing a few words. At best, it is just a copy of the gourd, and there is no contribution at all." Tao Gu was deeply disappointed. In a fit of anger, he wrote a poem to mock himself, including two sentences: "It's ridiculous to laugh at the Taoist scholar in the Imperial Academy, who paints a gourd in the same way every year." From then on, "paint a gourd in the same way" became a common saying and was widely circulated among the people. Although Song Taizu was rather disdainful of literati such as Tao Gu, for the sake of consolidating his political power, he encouraged the emphasis on literature over military affairs, and left behind the ancestral motto of "do not kill literati". He asked future generations to swear in front of the "oath tablet" he left when they succeeded to the throne. One of the provisions was that they would never kill any scholar-bureaucrat who submitted a memorial. No matter how fierce the memorial he wrote, he could not kill him. Even if literati committed crimes, they were usually exiled. In addition, the Song Dynasty greatly relaxed the quota for imperial examinations, and those who passed the imperial examination could be directly awarded officials. Civilians can lead troops, and the deputy envoy to the Privy Council, the highest military institution, has long been held by civilians. In the Northern Song Dynasty, only Di Qing was the only one, and in the Southern Song Dynasty, only famous generals such as Yue Fei and Han Shizhong held this position.
So, the Song Dynasty was a paradise for literati. At that time, culture was prosperous, and a large number of writers, historians, calligraphers, and painters emerged. "If you excel in learning, you will become an official; if you excel in officialdom, you will learn" became a true portrayal of the literati at that time. There is no "court staff", no persecution, just scholarly spirit.
Although the parties are united and opposed by different parties, they are all loyal to the emperor and patriotic. However, at the same time, the long-term vigilance towards military commanders and some inappropriate measures led to a situation in the Song Dynasty where the civil power was strong and the military was weak. Later, the Liao Kingdom and the Jin Kingdom invaded one after another, and the Northern Song Dynasty was forced to move south, and was finally destroyed by the Yuan Dynasty.