During the final years of the Qing Dynasty, the British and French forces' modern rifles and cannons had terrified every corrupt official in the Manchu court, from the highest ministers down to the lowliest clerks—none dared to offend the foreigners in the slightest.
A certain Governor Wen was exactly that kind of official.
Governor Wen had a peculiar habit: he absolutely forbade anyone from disturbing him during meals. Whether a guest came to call or a subordinate sought an audience, no one was allowed to announce them until he had finished eating and wiped his face. Otherwise, the servant who dared to report would be met with harsh scolding at best, or fists and kicks at worst.
That day, Governor Wen was eating when a foreign consul requested an audience. Hearing that a foreigner had arrived, the governor was terrified and lost his composure. Not only did he break protocol by saying, "Quickly invite him in," but he also dressed properly and went personally to the eaves of the veranda to greet him.
Why did this consul come to see the governor? It turned out the governor had recently executed one of his own guards. This was a trivial matter—the guard must have been guilty beyond redemption for the governor to punish him so harshly. But the problem was where the execution took place: not at the parade ground, nor outside the government office, but right next to the consul's residence. So the consul took offense and came to demand an explanation.
Upon meeting, the consul indignantly recounted the entire incident and demanded of the viceroy, "Why did you execute someone right next to my residence?"
The governor was quite adept at adapting to circumstances. After a moment's thought, he calmly replied, "The soldier I executed was originally a member of the Boxer faction. Last year, when the Boxers in Beijing clashed with your country and others, he was involved. Now that I have confirmed the facts, I have carried out his execution."
The consul said, "The law is just, but why must the execution take place right next to my residence?"
The governor, struck by a sudden inspiration, improvised a reply: "Precisely because the Boxers are causing trouble for foreigners, which also harms Your Excellency, I devised a plan to execute this man right beside your yamen, so his comrades would be terrified. As the saying goes, 'Kill the chicken to scare the monkey'—once the chicken is dead, the monkey naturally fears. Though I only killed one soldier, all the Boxers, seeing this example, will no longer dare to trouble Your Excellency."
Upon hearing the governor's reply, the consul burst into laughter, praised him for handling the matter well, then exchanged a few more words before taking his leave.
Later, the idiom "kill the chicken to scare the monkey" came to mean punishing one person to warn others.
Source: *The Officialdom Unmasked*
Meaning of the Idiom: Later, the Chinese idiom "杀鸡骇猴" came to describe punishing one person to warn others.