Li Kui was born in 711, at the end of the reign of Emperor Ruizong. He was from a prominent clan that, by Li Kui's time, was domiciled in Zheng Prefecture (鄭州, in modern Zhengzhou, Henan) but which traced its ancestry to a line of prominent officials of Northern Wei, who in turn traced their ancestry to Li Fan (李翻), a son of Li Gao, the founder of the Sixteen Kingdoms state Western Liang. (The Tang Dynasty imperial clan also traced its ancestry to Li Gao, through Li Gao's second son and successor Li Xin.) After Northern Wei, Li Kui's ancestors served as officials of Sui Dynasty and Tang Dynasty. Li Kui was said to be intelligent, dextrous, and studious in his youth, and he was capable in writing.
Toward the end of Emperor Xuanzong's Kaiyuan era (713–741), Li Kui passed the imperial examinations and was made the sheriff of Chenliu County (陳留, in modern Kaifeng, Henan). After he submitted his writing to Emperor Xuanzong, Emperor Xuanzong, apparently impressed, issued an edict allowing him to work at the legislative bureau of government (中書省, Zhongshu Sheng) on a trial basis. He was subsequently made You Shiyi (右拾遺), a junior official at the legislative bureau, and then successively served in the higher offices of You Bujue (右補闕) and Qiju Lang (起居郎) at the legislative bureau, and then as Zhi Zongzi Biaosu (知宗子表疏), the official in charge of receiving and acting on submissions from members of the imperial clan at the ministry of imperial clan affairs (宗正寺, Zongzheng Si). Later, he was promoted to be Sixun Yuanwai Lang (司勳員外郎), a junior official at the ministry of civil service affairs (吏部, Libu), and then the higher office of Kaogong Langzhong (考功郎中) at the ministry of civil service affairs, in charge of evaluating the officials' performance. He was also involved in drafting edicts for Emperor Xuanzong. After the general An Lushan rebelled in 755 and forced Emperor Xuanzong to flee to Jiannan Circuit (劍南, headquartered in modern Chengdu, Sichuan), Li Kui accompanied Emperor Xuanzong to Jiannan and was made Zhongshu Sheren (中書舍人), a mid-level official at the legislative bureau.
Emperor Xuanzong's son and crown prince Li Heng, however, did not follow him to Chengdu and instead fled to Lingwu, where he was declared emperor (as Emperor Suzong), an act that Emperor Xuanzong recognized when he heard the news. After Emperor Suzong recaptured and returned to Chang'an in 757, his wife Empress Zhang became a dominating figure at court. She wanted her son Li Zhao (李佋) the Prince of Xing, who was only several years old at that point, to be made crown prince. Emperor Suzong, however, was instead considering his oldest son Li Chu the Prince of Cheng, who had contributed much to his campaigns to recapture Chang'an and the eastern capital Luoyang. Emperor Suzong consulted Li Kui and stated to him, "The Prince of Cheng is the oldest and had accomplished much. I want to create him crown prince. What do you think, sir?" Li Kui got up and bowed to Emperor Suzong, stating: "This is great blessing to the state. I am uncontrollably happy." Li Kui's comments affirmed Emperor Suzong's thoughts, and he created Li Chu crown prince in summer 758. In spring 759, when the officials who wanted to flatter Empress Zhang proposed that she be given a special honorific epithet of Yisheng (翊聖, meaning, "one who assists the holy one"). When Emperor Suzong consulted Li Kui on whether this was appropriate, Li Kui opposed, pointing out that the only prior instance when such an epithet was given to a living empress was to Empress Wei, the powerful and corrupt wife of Emperor Suzong's granduncle Emperor Zhongzong. After a lunar eclipse — which indicated divine displeasure with the empress — occurred around the same time, Emperor Suzong tabled the proposal.
By this point, Li Kui also had the additional office of deputy minister of rites (禮部侍郎, Libu Shilang). He was displeased with how the officials in charge of the imperial examinations at the time were making their testing questions test highly obscure facts, and he believed that this led to the selection of examinees who were not necessarily talented or capable in writing. He therefore, at the examinations, made the Confucian classics, histories, and qieyun references available to the examinees for them to look through the books during examination. He was much praised for this reform. It was also said that Li Kui was handsome in appearance and capable in rhetoric. Emperor Suzong once told him, "You, sir, are the highest grade in your clan's prominence, in your appearance, and in your writing."
Also in spring 759, Emperor Suzong, as a part of his reorganization of his chancellors, removed Miao Jinqing and Wang Yu from their chancellor posts and replaced them with Li Kui, Lü Yin, Li Xian, and Diwu Qi. In Li Kui's case, he was given the post of Zhongshu Shilang (中書侍郎), the deputy head of the legislative bureau, which was not itself a chancellor post, but given the additional de facto chancellor designation of Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事), making him a chancellor. He was also put in charge of editing the imperial history. At that time, there were much banditry within the city of Chang'an itself, and the powerful eunuch Li Fuguo wanted to commission several hundred soldiers from part of the imperial guard corps, the Yulin Army (羽林軍), to patrol the streets at night. Li Kui opposed this, pointing out that the Yulin Army and another part of the imperial guards corps, the Jinwu Guards (金吾衛), which were already responsible for patrolling the streets, served as counterweights to each other, and allowing the Yulin Army to patrol the streets throw the balance out of whack. Emperor Suzong agreed and tabled Li Fuguo's proposal. Nevertheless, it was also said that Li Kui did not dare to offend Li Fuguo, and despite the fact that Li Kui's clan was prominent, he bowed to Li Fuguo whenever he saw Li Fuguo, and referred to Li Fuguo as "Father Five" (五父) (as Li Fuguo was fifth in his birth rank).
As chancellor, it was said that Li Kui was capable and decisive, but that he was also grasping onto fame and fortune, drawing criticism for doing so. He was also criticized for the fact that his brother Li Jie (李楷) was also capable, but during Li Kui's term as chancellor, was stuck at a position that lacked actual power with Li Kui doing nothing about it. Meanwhile, Lü, who was removed from his chancellor position in 760, was sent out to be the military governor (Jiedushi) of Jingnan Circuit (荊南, headquartered in modern Jingzhou, Hubei) and was gaining a good reputation at the position. Li Kui, who did not get along with Lü while both were chancellor, was concerned that Lü might return to the capital to be chancellor again, submitted an accusation that Lü, who had recently had proposed having eight prefectures added to his circuit, was overly ambitious; Li Kui also sent officials to Lü's circuit to try to find faults with Lü. When Lü reported this to Emperor Suzong, Emperor Suzong, displeased, demoted Li Kui to be the secretary general of Yuan Prefecture (袁州, in modern Yichun, Jiangxi). (Only after Li Kui was demoted was his brother Li Jie promoted.)
Several years later — therefore, therefore likely under the reign of Li Chu (whose name had been changed to Li Yu at that point), as Emperor Daizong (Emperor Suzong having died in 762) — Li Kui was slightly promoted, to be the prefect of She Prefecture (歙州, in modern Huangshan, Anhui). However, he would soon be trapped by an action from his past. While he was chancellor, Miao Jinqing had once recommended Yuan Zai for promotion. Li Kui, whose own clan was prominent and who looked down on those with humble origins — which was the case with Yuan Zai — refused, and stated to Miao:
Is it the case we are not promoting officials with the lineage of a dragon and appearance of a phoenix, but instead are promoting the son of a water deer or a rodent?
This caused Yuan to have much resentment toward Li Kui. As Yuan became a powerful chancellor during Emperor Daizong's reign, he gave Li Kui an honorable post with little power or salary — acting Mishu Jian (秘書監), the head of the Palace Library — and then ordered that Li Kui be sent to the region between the Yangtze River and the Huai River, on the excuse that Li Kui was ill and needed to tend to his illness. It was said that because the position lacked salaries and Li Kui lacked savings, his large household became so poor that members even had to beg for food. Li Kui moved from prefecture to prefecture, as he would move whenever the prefect would dishonor him. Only after Yuan was executed in 777 was Li Kui again given a substantive position — the prefect of Mu Prefecture (睦州, in modern Hangzhou, Zhejiang). He later returned to Chang'an to serve as the principal of the imperial university (國子監, Guozi Jian) and minister of rites (禮部尚書, Libu Shangshu).
Emperor Daizong died in 779 and was succeeded by his son Li Kuo (as Emperor Dezong). Li Kui continued to serve as minister of rites, but the powerful chancellor Lu Qi was jealous of his reputation and seniority. In 783, after the emissary of the Tibetan Empire Qujiazan (區頰贊) arrived in Chang'an to negotiate a border realignment treaty with Tang and after the treaty was completed, at Lu's instigation, Emperor Dezong made Li Kui emissary to the Tibetan Empire to escort Qujiazan back to the Tibetan Empire. Li Kui, then 72, stated to Emperor Dezong, "I do not fear going that far a distance, but I am afraid that I would die on the way and not complete my task." Emperor Dezong, who was saddened by the remarks, told Lu, "Li Kui is too old." Lu responded, "An emissary to a far-away foreign state needs to have a good reputation. Further, if Li Kui, who is this old, is sent as an emissary, then in the future, no official younger than Li Kui would dare to refuse such a task." When Li Kui got to the Tibetan Empire, its king Trisong Detsen asked, "I heard that there is a Li Kui who is the most able of officials in Tang. Are you that person, lord?" Li Kui was afraid that this meant that Trisong Detsen intended to detain him, and therefore responded, "That Li Kui would never be willing to come here." On his way of returning from the Tibetan Empire in 784, he died at Feng Prefecture (鳳州, in modern Baoji, Shaanxi). He was buried with honor and given the posthumous name Gong (恭, meaning "respectful").