Li Lin was born in 694, during the reign of Wu Zetian. He was a member of the imperial Li clan of Tang Dynasty — although he was distant in lineage from the imperial lineage itself. His great-great-great-grandfather Li Qidou (李乞豆) was a younger brother of Li Hu (李虎), the grandfather of Tang's founding emperor Emperor Gaozu, who was the grandfather of Wu Zetian's husband Emperor Gaozong. Li Lin's father Li Jun (李濬) served successively as the prefect of three different prefecture and was known for his honesty. Li Jun died during the Kaiyuan era (713–741) of Emperor Gaozong's and Wu Zetian's grandson Emperor Xuanzong while serving as the military governor (jiedushi) of Jiannan Circuit (劍南, headquartered in modern Chengdu, Sichuan).
Li Lin himself was well-studied and capable in literary matters. On the account of his father's official service, he was able to enter civil service and eventually served as a census officer for the capital municipality, Jingzhao (京兆, roughly modern Xi'an, Shaanxi), which included the capital Chang'an. In 734, Emperor Xuanzong made an attempt to find imperial clan members with special talents, and Li Lin, one of the imperial clan members selected, was made Dianzhong Shiyushi (殿中侍御史) — a low-level imperial censor — and he subsequently served as a junior officer at the ministries of census (戶部, Hu Bu) and civil service affairs (吏部, Li Bu). In 742, he became Jianyi Daifu (諫議大夫), one of the officials in charge of submitting proposals of corrections to the emperor. In 746, he served a tour of duty to survey the circuits to the west — Hexi (河西, headquartered in modern Wuwei, Gansu), Longyou (隴右, headquartered in modern Haidong Prefecture, Qinghai), and Anxi (安西, headquartered in modern Aksu Prefecture, Xinjiang) – to evaluate the performance of the officials. His tour was considered a success, and he was made an imperial attendant (給事中, Jishizhong). In 748, he became Bingbu Shilang (兵部侍郎) – an assistant minister of defense — serving with Yang Guozhong. At that time, though, Yang was already very powerful due to his personal association with Emperor Xuanzong, as cousin to Emperor Xuanzong's favorite concubine Consort Yang Yuhuan, and Yang Guozhong did not wish to share authority with Li Lin, and therefore had the chancellors, while allowing Li Lin to keep the title of assistant minister of defense, be made in charge of the imperial examinations instead. Soon, however, Yang Guozhong was moved to another position, and Li Lin resumed his office as assistant minister of defense. In 752, he was given the honorific title of Yinqing Guanglu Daifu (銀青光祿大夫) and made the principal of the imperial university (國子祭酒, Guozi Jijiu). In 755, while he retained those titles, he was made the governor of Hedong Commandery (河東, roughly modern Yuncheng, Shanxi) and the surveyor of Hedong Circuit (河東 as well, but referred to the entire circuit, headquartered in modern Taiyuan, Shanxi). He was said to have governed simply and honestly, and was praised by both the people and subordinates.
In winter 755, however, the general An Lushan rebelled at Fanyang Circuit (范陽, headquartered in modern Beijing). As Li Lin was a civilian official not learned in military matters, the imperial government was concerned that he would not know how to defend the commandery. Li Lin was therefore recalled to Chang'an and replaced with the general Lü Chongbi (呂崇賁). Li Lin was also created the Baron of Weiyuan. In summer 756, when Emperor Xuanzong was forced to flee Chang'an in light of An's troops approaching Chang'an, Li Lin escaped Chang'an as well and caught up with Emperor Xuanzong's train, attending Emperor Xuanzong on his way to Chengdu. Emperor Xuanzong's son and crown prince Li Heng, however, did not follow Emperor Xuanzong to Chengdu, but instead went to Lingwu, where he was declared emperor (as Emperor Suzong), a declaration that Emperor Xuanzong recognized after the news reached him. Emperor Xuanzong, now using the title Taishang Huang (retired emperor), however, did not stop exercising imperial authority, and when he arrived at Chengdu, he initially made Li Lin deputy minister of census (戶部侍郎, Hubu Shilang) and Shangshu Zuo Cheng (尚書左丞), one of the secretaries general of the executive bureau of government (尚書省, Shangshu Sheng). He soon made Li Lin the minister of justice (憲部尚書, Xianbu Shangshu).
In spring 757, Emperor Xuanzong gave Li Lin the designation Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事), making him a chancellor de facto. At that time, Emperor Xuanzong had already sent several other chancellors that he had commissioned during his journey to Chengdu and during the duration he was at Chengdu — Wei Jiansu, Fang Guan, Cui Huan, and Cui Yuan — to Emperor Suzong's court, but kept Li Lin with him on account of the fact that Li Lin was an imperial clan member. Li Lin oversaw all of the affairs of Emperor Xuanzong's court in Chengdu. In winter 757, after Emperor Suzong recaptured Chang'an and welcomed Emperor Xuanzong back to Chang'an, for Li Lin's accomplishments, he was given the honorific title Jinzi Guanglu Daifu (金紫光祿大夫). He continued to be the minister of justice, now under the title Xingbu Shangshu (刑部尚書). His chancellor de facto designation was promoted to Tong Zhongshu Menxia Sanpin (同中書門下三品), a more honorific designation, and he was created the Duke of Bao.
At that time, the most powerful figures at Emperor Suzong's court were his wife Empress Zhang and the eunuch Li Fuguo. Li Lin's chancellor colleagues Miao Jinqing and Cui Yuan both carefully followed Empress Zhang's and Li Fuguo's wishes, but Li Lin refused to do so. This displeased Li Fuguo and, in 758, at his instigation, Li Lin was removed from his chancellor office and made Taizi Shaofu (太子少傅), an advisor to the crown prince Li Chu. He died in fall 759 and was buried with honors.