The story is taken from Analects of Confucius.
Yan Yan, a student of Confucius, was the magistrate of Wucheng. Once when Confucius went there he heard the strains of zithers and the sound of singing. Deeming it extravagant to enact lavish ceremonies in such a small town, he said with a sardonic smile: “why use a poleaxe to kill a chicken?” Yan Yan defended himself, saying that he was doing what his teacher had encouraged him to do, and thereby would govern Wucheng better. Then Confucius recognized the reason in Yan Yan’s words, and said that he had only been joking.
Later, the metaphor “killing a chicken with a poleaxe” began to be used to describe making a fuss over a trifling matter, or wasting one’s talent on a petty endeavor.
Source: The Stories Behind 100 Chinese Idioms by He Zeren & Zhou Lingzhong