Le Yanwei was from the Tang capital Chang'an. As of 656, he was serving as imperial attendant, when Liu Hongye (劉弘業), the son of Liu Ji, a former chancellor who was accused of improprieties (comparing himself to historical regents Yi Yin and Huo Guang) and forced to commit suicide by Emperor Gaozong's father Emperor Taizong in 646, submitted a petition accusing the recently deposed chancellor Chu Suiliang of having falsely accused Liu Ji in 645. (Liu Hongye did so at the instigation of the chancellor Li Yifu, who was a political enemy of Chu and a former subordinate of Liu Ji.) Emperor Gaozong consulted his officials, and they, wanting to ingratiate themselves with Li Yifu, an ally to Emperor Gaozong's powerful wife Empress Wu (later known as Wu Zetian), all were in favor of reversing the judgment on Liu Ji. Le, however, opposed this, stating:
Liu Ji was an important official, and his behavior should have been appropriate. How could he have begun to scheme when the emperor was ill? The punishment given him by the emperor was appropriate. Further, the emperor should be considered without fault. If the judgment on Liu Ji were reversed, are you not saying that Emperor Taizong was using inappropriate punishment?
Emperor Gaozong agreed and suspended further discussion. Soon thereafter, one of Le's parents died, and he left governmental service. He was soon recalled to serve as the prefect of Tang Prefecture (唐州, roughly modern Nanyang, Henan). As he went to see the emperor to thank for the commission, Emperor Gaozong remembered his willingness to stand up to Li Yifu, and kept him at the central government's examination bureau (東臺, Dong Tai) as a mid-level official. Around new year 665, Le was serving as Xi Tai Shilang (西臺侍郎) -- the deputy head of the legislative bureau (西臺, Xi Tai) -- as well as a staff member for Emperor Gaozong's crown prince Li Hong, when he was given the designation Tong Dong Xi Tai Sanpin (同東西臺三品), making him a chancellor de facto. However, about four months later, both he and his colleague Sun Chuyue were no longer chancellors. He was instead made imperial censor, succeeding Liu Rengui. He was still imperial censor in 670 when the generals Xue Rengui, Guo Daifeng (郭待封), and Ashina Daozhen (阿史那道真) suffered a major loss to Tufan forces commanded by its general Gar Trinring Tsendro ("Lun Qinling" (論欽陵) in Chinese). Emperor Gaozong sent Le to the army to investigate, and he put Xue, Guo, and Ashina in chains and delivered them back to Chang'an, where Emperor Gaozong spared their lives but removed them from their posts. Le died in 676 and was buried with honor. His son Le Sihui later also served as a chancellor, during the reign of Wu Zetian.