Han Fei was a prince of the royal family of Han. He and Li Si studied with the philosopher Xun Kuang. Li Si, who later became chancellor of Qin under the First Emperor, felt that he was not the equal of Han Fei. But Han stuttered and could not present his ideas in court, which was a serious impediment. He overcame this by developing one of the most brilliant styles in ancient China.
Han Fei saw the gradual, but constant, decline of the state of Han and tried on several occasions to persuade the king to follow different policies, but the king proved incapable of following his advice. He witnessed with increasing despair how rulers of his day were beguiled by Ru and Mohist philosophers who prattled endlessly about moral virtues and by roving bands of knights-errant who performed acts of daring in contravention of the laws. Both caused the increasing disorder of society and distracted rulers from the real tasks of governing. "When the state is at peace, rulers support scholars and knights-errant, but when troubles arise they employ men of arms. Thus they support people they do not need and do not support those they do need."
Ultimately, Han Fei's works made their way to Qin where the future First Emperor saw them and wanted to meet the man who wrote them. Li Si identified the writings as those of his classmate Han Fei, and Han Fei did come to Qin in 234. But even though the First Emperor was pleased with Han Fei's advice, he did not fully trust him. Yao Jia, who had been censured by Han Fei for his conduct, and it is said Li Si as well, played on the suspicion that, being a member of the royal family of Han, Han Fei could never be entirely loyal to the interests of Qin, "that it is the nature of human feelings that he will always work for the interests of his native Han and not for those of Qin." The First Emperor accepted Yao's conclusion and had Han Fei imprisoned for a crime. Han Fei tried to defend himself, but he could not get an audience. Hence Li Si sent him some poison so that he could commit suicide. The First Emperor later regretted his condemnation of Han Fei and was going to pardon him, but Han was already dead.
When he died in 233, Han Fei was still a young man, but he had already established a reputation because of his brilliant writings. Some 55 of his books survive collected together in the Hanfeizi by Li Xiang about 25BC. Among the most famous of them are "Five Vermin" which castigates the rulers of the day for pandering to useless people like Mohist and Ru scholars and knights-errant who disrupt the court and weaken the country and "Eminence in Learning".