Career
Yan began his career as a general serving under the warlord Liu Zhang of Yi Province. In Luo Guanzhong"s historical novel Romance of the Three Kingdoms, Yan Yan was defeated and captured by Zhang Fei in 212 in one of the battles during Liu Bei"s takeover of Yi Province. Yan firmly refused to surrender and made strong accusations at Liu Bei, which angered Zhang Fei.
Zhang wanted to have him executed but changed his mind later as he was impressed with Yan"s strong sense of loyalty.
Zhang released Yan and succeeded in persuading Yan to join Liu Bei"s forces.