In 1851, a Chinese peasant named Hong Xiuquan launched a rebellion against the ruling Qing Dynasty that would only end in thirteen years later after millions had died in what may have been the bloodiest civil war in history. After reading a Christian missionary tract and experiencing a number of strange dreams, Hong had become convinced that he was the younger brother of Jesus and that he had commanded by God to oust the alien Manchus who then ruled China. He proclaimed the establishment of a (putatively) theocratic state which he called the Heavenly Kingdom of Great Peace--Taiping Tianguo in Chinese, and succeeded in creating a huge army which gained control over much of central China. One of the commanders of the imperial forces battling the Taiping was a scholar-official named Zeng Guofan. While seeking contributions for a militia force he was raising, Zeng issued a proclamation in which, according to historian Stephen R. Platt:
He warned that the Confucian texts were banned under the Taiping. "Scholars cannot read the classics of Confucius," he wrote, "but instead there are the so-called words of Jesus: the 'New Testament' book. They take thousands of years of Chinese manners, ethics, classics, and laws, and in a single day sweep them away completely!". (Autumn in the Heavenly Kingdom: China, the West, and the Epic Story of the Taiping Civil War, p. 124)
Why was Zeng so outraged about the banning of Confucian texts by the Taiping? In large part it was due to the fact that teachings of the ancient philosopher Confucius (551-479 BC) and his disciples had become, in effect, the state ideology of China. In fact, according to Platt, while Zeng only had a vague understanding of the religious beliefs of the Taiping, "it was enough for him that they had destroyed Confucian temples in the cities they conquered. Those temples, with their rituals in honor of the sage and the state system they represented, were the foundation of his life's career" (p. 123).
Given that it is often said that Confucianism is a not a religion, but rather an ethical system, it may seem strange that there should have been (and still are) such things as "Confucian temples". However, the existence of Confucian temples reflects the reality that Confucianism did (and arguably still does) have a somewhat religious character. Even though Confucius himself said relatively little about what we would consider theological matters (and there is still debate today about the exact nature of religious views), once the Han Dynasty (200 BC-220 AD) adopted Confucianism as its official ideology, Confucius began to be venerated as the greatest of all sages, which led to the practice of making sacrificial offerings to his spirit. Such offerings were made at temples (or shrines), which often contained tablets bearing the names of Confucius and his most important disciples. Such temples or shrines still exist in mainland China (for example, in Confucius' hometown Qufu), Taiwan (for example, in Taipei), and in other places with significant Chinese populations. I understand there are even Confucian shrines in countries that in the past were influenced by Chinese culture, like Vietnam and Japan. I still remember visiting the rather large Confucian temple in Beijing. Interestingly, offerings to the spirit of Confucius are still made every year at the Confucian shrine in Taipei on Confucius' birthday, which just happens to be today, September 28.
As Confucius began to be officially venerated, stories arose about his supposedly miraculous birth. For example, it was said that two dragons appeared around the house where he was born. Images of Confucius appeared in some temples along side Daoist and Buddhist deities. In short, for at least some Chinese, Confucius had become a quasi-deity.
Even though a scholar like Zeng Guofan probably didn't view Confucius as a sort of god, his deep esteem for Confucius and his teachings did have, arguably, a quasi-religious character. Thus, for him, the struggle against the Taiping was not just a political struggle, but something of an ideological or even religious conflict, especially if religion is defined as any system of belief that gives meaning to one's life. So, it is not surprising that he was so incensed by the destruction of Confucian temples, for it represented an attack on his most fundamental beliefs.
Image of the entrance to the Confucian Temple in Beijing from Wikimedia Commons