In his early life, he served briefly in the local district office before leaving home to study under the tutelage of the Confucian scholar Zheng Xuan.
In the late 190s, Cui Yan became a subordinate of the northern warlord Yuan Shao but did not make any significant achievements under the latter, who ignored his suggestions.
In his youth, he was known to be plain, dull and lacking in communication skills, but he was very interested in swordsmanship and military arts.
When he was 22 years old, he was nominated by the local district office to be a judicial officer,[a] for which he was so grateful that he started reading books such as the Analects and Han Shi (韓詩)[b][2] Six years later, at the age of 28, Cui Yan befriended Gongsun Fang (公孫方) and others and they studied together under the tutelage of the Confucian scholar Zheng Xuan.
However, in 194, before Cui Yan could even complete his first year of studies, the Yellow Turban rebels from Xu Province attacked Beihai Commandery, where Zheng Xuan conducted his classes, so Zheng and his students fled east to Mount Buqi (不其山; northwest of Mount Lao) to evade chaos.
After leaving Mount Buqi, Cui Yan could not return to Qinghe Commandery because rebel forces and bandits were rampant in the region and the roads leading west were blocked.
He wandered around Qing, Xu, Yan and Yu provinces and visited several places, including Shouchun (壽春; present-day Shou County, Anhui), Lake Tai and the northern bank of the Yangtze River.
[3] Around the late 190s,[c] the northern warlord Yuan Shao heard of Cui Yan and recruited the latter to serve under him.
At the time, due to widespread chaos and famine, many soldiers had resorted to crime as a means of survival and some started robbing and plundering tombs.
You should order all commandery and county officials to ensure that the dead are properly buried, so as to showcase your sympathy and compassion by following the benevolent acts of King Wen of Zhou."
Cui Yan replied, "The Empire is in a state of chaos and the Nine Provinces are divided, while the Yuan brothers fight among themselves and the bodies of the dead are scattered throughout the wilderness.
The people have yet to see how your forces will bring benevolent rule and relief aid to them and liberate them from war and disaster, but now the first thing you do is to check the records for the numbers of troops and military equipment you've obtained.
Once, when Cao Pi went on a hunting excursion to enjoy himself, Cui Yan wrote a long letter to him, haranguing the former on overly indulging in personal pleasures and neglecting his duties.
Cao Pi later sent a reply, stating that he had destroyed his hunting equipment and thanking Cui Yan for his lecture.
The order from the Han imperial court conferring the appointment on Cui Yan read, "You possess the style of Boyi and the integrity of Shi Yu (史魚).
Cui Yan openly replied, "According to Confucian ethics, a man's heir apparent should be his eldest son.
Cui Yan once recommended Yang Xun (楊訓), who was from Julu Commandery, to serve in the government.
Although Yang Xun's abilities were not up to expectations, Cui Yan still nominated him on the grounds of excellent moral conduct.
Yang Xun was ridiculed by many people for his flattering behaviour; Cui Yan was also cast in a negative light because he was deemed as having recommended a sycophant to join the civil service.
"[11]According to the historian Chen Shou, who wrote Cui Yan's biography in the Records of the Three Kingdoms (Sanguozhi), Cui's true intention in writing those remarks was to mock Yang Xun's critics for being too eager to disparage Yang without making any careful consideration.
[18] Two of Cui Yan's ex-classmates, Gongsun Fang (公孫方) and Song Jie (宋階), who studied together with him under Zheng Xuan, died early.
[19] The Xianxian Xingzhuang (先賢行狀) mentioned, "Cui Yan was noble and virtuous, possessed foresight, promoted ethics, and stood dignified in the imperial court.
According to early records from Wei, his bureau was orderly and free of corruption throughout the ten years or so when he held office.