It is not known when Li Yiyan was born. His family was from Wei Prefecture, but his ancestors were said to be originally from Longxi, thus sharing an origin with Tang Dynasty's imperial Li clan, but he was considered sufficiently distant not to be considered an imperial clan member. His father Li Xuande served as the county magistrate of Yingtao County. Li Yiyan himself passed the imperial examinations when he was young, and subsequently served as the sheriff of Taiyuan County. At that time, he served under the famed general Li Shiji, who served as the commandant at Bing Prefecture. Because of Li Shiji's accomplishments and reputation, the other subordinate officials were all fearful of him and dared not to speak on important matters with him, but Li Yiyan was said to be unafraid of the commandant and was willing to discuss matters of importance. As a result, Li Shiji respected him.
During Emperor Gaozong's reign
During the Linde era, Li Yiyan served as the magistrate of Baishui County and was said to be capable as a county magistrate. He was subsequently promoted to be a mid-low-level official at the ministry of justice, and was eventually promoted to the post of Zhongshu Shilang -- deputy head of the legislative bureau of government -- during the Shangyuan era. In 675, when Emperor Gaozong, because of his chronic illness, considered making his powerful wife Empress Wuregent, the chancellor Hao Chujun vehemently opposed, and Li concurred with Hao, eventually leading to Emperor Gaozong abandoning the idea. In 676, Li was given the designation Tong Zhongshu Menxia Sanpin, making him a chancellor de facto. In 677, he was also made a member of the staff of Emperor Gaozong's crown princeLi Xian. In 680, when Li Xian offended Empress Wu and was deposed on accusation of treason, Li's fellow chancellor and fellow staff member Zhang Da'an was demoted, but Emperor Gaozong pardoned the rest of the staff and retained them for the new crown prince Li Zhe. The staff, including fellow chancellor Xue Yuanchao, all danced in gratitude, but Li did not dance but was instead blaming himself for Li Xian's downfall—and this led to much praise from the people. It was said around the same time that Li's mansion did not have a central bedroom. At that time, his brother Li Yijin was serving on staff of the prefecture of Qi Prefecture, and when Li Yijin heard this, he bought good wood and delivered them to Li Yiyan. On a subsequently occasion, when Li Yijin was visiting the capital, he saw that Li Yiyan had not yet used the wood to build a central bedroom, and he asked Li Yiyan about it. Li Yiyan responded, "I feel inadequate as a chancellor, and if I build an impressive bedroom, this would bring disaster on me. How is this loving me?" Li Yijin responded, "Even when a person becomes a county magistrate or sheriff, he would want to build a new house. My brother, you are honored and powerful, why do you live in a small house to bring shame to your subordinates?" Li Yiyan further responded, "Not everything should be perfect, and blessings will not be doubled. Since I am an honored official, if I expand my mansion, unless I am fully virtuous, I will bring disaster on myself. It is not that I do not want a new bedroom, but that I am afraid of disaster." He therefore never constructed a new bedroom, and eventually, the wood decayed after rain. In 683, Li Yiyan was moving his parents' tomb, and he asked his maternal uncle to move his maternal ancestors' tombs. When Emperor Gaozong heard this, he angrily remarked, "Li Yiyan is leaning on his uncle just because he is honored. This person should not be again in charge of important things!" When Li heard this, he became disconcerted, and he requested retirement on account of foot illness, which Emperor Gaozong granted, and Emperor Gaozong further gave him the honorific titleYinqing Guanglu Daifu. As Li was about to retire to the vicinity of the eastern capital Luoyang, many officials held a feast in his honor just outside the city gates, and this scene was compared to the grand sendoff that was held for the Han Dynasty officials Shu Guang and his nephew Shu Shou, who retired at the height of their careers.
Emperor Gaozong died in 683, and Empress Wu, as empress dowager, subsequently served as regent over Emperor Zhongzong, whom she deposed in 684 due to his disobedience to her, and created Emperor Ruizong, both her sons. Early on Emperor Ruizong's Chuigong era, a recall of Li Yiyan was made, asking him to serve as the prefect of Huai Prefecture, but Li, knowing that he had previously offended Empress Dowager Wu by opposing her regency, was apprehensive and did not accept the recall. He died in 688.