Records of the Three Kingdoms
Li Yan, courtesy name Zhengfang, was from Nanyang. He had been a commandery administrator under Liu Biao and Liu Zhang. After Liu Bei entered Shu he submitted, and his ability was valued. In 223, dying at Yong’an, Liu Bei entrusted the future to both Zhuge Liang and Li Yan. Li Yan stayed at Yong’an as protector of the center, in command of military affairs inside and outside. He later changed his name to Li Ping.
In 231 Zhuge Liang came out at Qishan and left Li Yan to move the grain. Summer and autumn rains broke the supply. Li Yan sent word for Zhuge Liang to retreat. When the army was back he asked, as if surprised, why it had retreated, and tried to put the blame on Zhuge Liang. Zhuge Liang set the earlier and later documents against each other and memorialized to reduce Li Yan to a commoner, sent to Zitong. In 234 Zhuge Liang died. Li Yan believed no one would employ him again. He sickened from the shock and died.
Romance of the Three Kingdoms
The novel has Li Yan fail the grain and then memorialize a false charge. Zhuge Liang reduces him to a commoner. The frame matches the histories. The confrontation of documents is staged more like a court.
When he hears of Zhuge Liang’s death and sickens, the book uses it to say that only the chancellor could hold him.
Reference: Wikipedia · Li Yan