定军山
Yan Yan has a greater role as a character in the 14th-century historical novel "Romance of the Three Kingdoms", which romanticises the events before and during the Three Kingdoms period. In Chapter 63 of the novel, as in history, he is defeated and captured by Zhang Fei, who initially wants to execute him but changes his mind and spares him after feeling impressed with Yan Yan's strong sense of loyalty. Zhang Fei also manages to convince Yan Yan to switch his allegiance to Liu Bei. Yan Yan appears again later in Chapters 70 and 71, when he joins Huang Zhong to attack Cao Cao's forces at the Battle of Mount Dingjun.