Li Jing (; 571Li Jing's biography in New Book of Tang indicated that he was 79 by (East Asian reckoning) when he died. Thus by calculation, his birth year should be 571. His biography in Old Book of Tang recorded his final words, wherein he claimed to be nearing 80 (by East Asian reckoning). – July 2, 649xinyou day of the 5th month of the 23rd year of the Zhen'guan era, per vol. 03 of Old Book of Tang), courtesy name Yaoshi (),The Old Book of Tang indicated that Yaoshi was Li Jing's original name, while the New Book of Tang indicated that it was his courtesy name. Compare Old Book of Tang, vol. 67, with New Book of Tang, vol. 93, both cited below. posthumous name Jingwu (), was a Chinese military general, strategist, and writer who lived in the early Tang dynasty and was most active during the reign of Emperor Taizong. In 630, Li Jing defeated the Eastern Türks, led by Illig Qaghan, with just 3,000 cavalry soldiers in a surprise attack, allowing the Tang Empire to subjugate the Eastern Türks and reduce them to the status of a vassal under the Tang Empire. Li Jing and Li Shiji are considered the two most prominent early Tang generals.

During the Sui dynasty Li Jing was born in 571, during the Sui dynasty's predecessor state Northern Zhou. His clan was from the Chang'an region. His grandfather Li Chongyi () served as a provincial governor during the Northern Wei, and his father, Li Quan (), served as a commandery governor during Sui. In his youth, Li Jing was said to be handsome and ambitious, and was talented both in literary and military matters. His maternal uncle was the Sui general Han Qinhu (), and it was said that Han was impressed by his talent, stating, "You are the only person that I can talk to about Sun Tzu's and Wu Qi's strategies."

Early in his career, Li Jing served as a minor county official for Chang'an countyone of the two counties within Chang'an, which served as Sui's capital. He later served as a low level official within the imperial administration, and it was said that he impressed both the prime minister Yang Su and the important minister Niu Hong ().

Near the end of the reign of Emperor Yang, Li Jing served as the vice prefect of the Mayi Commandery (, roughly modern Shuozhou, Shanxi), when he served under the general Li Yuan the Duke of Tang, who was in charge of the nearby important city of Taiyuan (, in modern Taiyuan, Shanxi) against Eastern Tujue forces. Li Jing came to suspect that Li Yuan was plotting a rebellion, and therefore pretended to commit a crime and asked to be locked up and delivered to Emperor Yang, who was then at Jiangdu (, in modern Yangzhou, Jiangsu). However, he was first delivered to Chang'an, and then, as nearly the entire Sui state was engulfed in agrarian rebellions at that time, there was no way to deliver him to Jiangdu from there.

In 617, Li Yuan indeed rebelled, and soon captured Chang'an, declaring Emperor Yang's grandson Yang You the Prince of Dai emperor (as Emperor Gong) but seizing power as regent. Knowing that Li Jing was planning to report his plans to Emperor Yang, Li Yuan set to execute him. At the execution, Li Jing yelled, "You, duke, rose in order to eliminate tyrannical rule for the people. You are not concerned about what is important, but instead are executing a brave man on account of personal enmity!" Li Yuan was impressed by his words, and Li Yuan's son Li Shimin interceded on Li Jing's behalf. Li Yuan released Li Jing, whom Li Shimin soon retained to serve on his staff.

During Emperor Gaozu's reign

In 618, after news arrived at Chang'an that Emperor Yang was killed in a coup at Jiangdu led by the general Yuwen Huaji, Li Yuan had Yang You yield the throne to him, establishing Tang dynasty as its Emperor Gaozu. Li Jing continued serving the new dynasty. In 619, Li Jing participated in a campaign against one of Tang's major enemies, Wang Shichong the Emperor of Zheng, and was promoted for his accomplishments. Later that year, Emperor Gaozu sent him to Kui Prefecture (, modern eastern Chongqing) to plan a military operation against another major enemy, Xiao Xian the Emperor of Liang, who then ruled the modern Hubei, Hunan, and Guangxi region. When he first reached Jin Prefecture (, roughly modern Ankang, Shaanxi), he encountered bandits in the mountain, who had several times defeated Li Yuàn (, note different tone and character than Emperor Gaozu's name ()) the Prince of Lujiang (Emperor Gaozu's distant nephew). Li Jing joined forces with Li Yuàn to defeat those bandits. However, as he arrived at the borders with Liang, he was blocked by Liang forces and long could not reach there, having to stop at Xia Prefecture (, roughly modern Yichang, Hubei). Emperor Gaozu, believing that Li Jing was intentionally not advancing, was sufficiently angry that he secretly ordered the commandant at Xia Prefecture, Xu Shao (), to execute Li Jing. Xu, however, was appreciative of Li Jing's talent, and submitted a petition urging that Li Jing be spared, and Emperor Gaozu relented. Meanwhile, in spring 620, around the same time, Ran Zhaoze () the leader of the Kaishan Tribe (), rebelled against Tang rule and attacked Kui Prefecture. When Emperor Gaozu's distant nephew Li Xiaogong the Duke of Zhao Commandery fought Ran, he was initially unsuccessful, but Li Jing reinforced him with 800 men and defeated and killed Ran.

In 621, Li Jing submitted 10 strategies against Liang, and Li Xiaogong submitted them to Emperor Gaozu. Emperor Gaozu approved of Li Jing's plans, and made Li Jing Li Xiaogong's assistant in the campaign against Liang. It was said that as Li Xiaogong was still inexperienced, Emperor Gaozu actually put Li Jing in charge of most of the operations, although Li Xiaogong was formally commander of the operations.Many of the strategies mentioned here that Tang forces employed against Xiao Xi and Fu Gongshi had their origins disputed; the biographies of Li Xiaogong in the Old Book of Tang and the New Book of Tang credited them to Li Xiaogong, while the biographies of Li Jing in those same works credited them to Li Jing. Compare Old Book of Tang, vol. 60 (biographies of Emperor Gaozu's collateral relatives) and New Book of Tang, vol. 78 (biographies of Emperor Gaozu's collateral relatives) with Old Book of Tang, vol. 67 (biographies of Li Jing and Li Shiji) and New Book of Tang, vol. 93 (biographies of Li Jing and Li Shiji). The Zizhi Tongjian generally credited these strategies to Li Jing. See Zizhi Tongjian, vols. 189, 190.

In fall 621, Emperor Gaozu commissioned Li Xiaogong, with Li Jing as his assistant, to launch a major attack on Xiao Xian's Liang state, with Li Yuàn and the other generals Tian Shikang () and Zhou Faming () attacking on other fronts. At that time, the Yangtze River had a high water level and was flowing rapidly. While many officers under him suggested delaying the campaign, Li Jing suggested to Li Xiaogong that the rapid water was a good opportunity to launch a surprise attack on Xiao Xian's capital Jiangling (, in modern Jingzhou, Hubei). After defeating the Liang general Wen Shihong (), Li Xiaogong put Jiangling under siege, cutting off Xiao Xian's communications with the armies in the rest of his territory. Li Jing suggested floating the Liang ships that they captured down the Yangtze, to confuse the approaching Liang relief forces into believing that Jiangling had fallen already. Xiao, not knowing that the relief forces were only a few days away, surrendered to Li Xiaogong. By the suggestion of Li Jing and Xiao's official Cen Wenben, who had persuaded Xiao to surrender, Li Xiaogong strictly prohibited pillaging and retribution against Liang generals. The Liang provinces, upon hearing the news of Jiangling's fall, soon largely submitted to Tang. Li Xiaogong delivered Xiao to Chang'an, where Emperor Gaozu executed him. For his accomplishments, Li Jing was created the Duke of Yongkang. Subsequently, Emperor Gaozu commissioned Li Jing to head south to persuade the modern Guangdong and Guangxi region, which had submitted to Xiao Xian and another rebel ruler, Lin Shihong the Emperor of Chu, to submit to Tang. Li Jing advanced to Gui Prefecture (, roughly modern Guilin, Guangxi) and was able to persuade several of the most major warlords of the region, including Feng Ang (), Li Guangdu (), and Ning Zhenzhang () to submit to Tang. Subsequently, Li Jing was made the commandant at Gui Prefecture.

In fall 623, the Tang general Fu Gongshi, who had served as the deputy of the powerful general Li Fuwei the Prince of Wu as the military governor of the lower Yangtze region, rebelled against Tang rule while Li Fuwei was at Chang'an, declaring himself the Emperor of Song. Emperor Gaozu commissioned Li Xiaogong to attack Fu, again making Li Jing Li Xiaogong's assistant, and also sending other generals Huang Junhan () and Li Shiji to attack Fu from other fronts. Li Xiaogong and Li Jing sailed down the Yangtze, attacking and defeating the Song generals at multiple battles. Fu ordered his generals Feng Huiliang () and Chen Dangshi () to take up position at Mount Bowang (, in modern Ma'anshan, Anhui, preparing for the assault, instructing Feng and Chen not to engage Li Xiaogong, but to wear him down. However, Li Xiaogong, under Li Jing's suggestion, cut off their supply route, and when Feng and Chen's food supplies ran low, they challenged Li Xiaogong. Against suggestions by some officers that he bypass Feng and Chen and attack the Song capital Danyang (, in modern Nanjing, Jiangsu) directly, Li Xiaogong, again with Li Jing's suggestion, confronted Feng and Chen, initially using the weaker segment of his forces to battle Feng and Chen and, after initial losses, draw Feng and Chen in deeper, and then attacked them, defeating them decisively, with the aid of Li Fuwei's subordinate general Kan Leng (). After the victory, Li Xiaogong and Li Jing attacked Danyang. Fu, in fear, abandoned Danyang and fled east, but was captured by the local men and delivered to Danyang. Emperor Gaozu, praising Li Jing, made the comment: "Li Jing is the fatal illness for Xiao and Fu. How could even Han Xin, Bai Qi, Wei Qing, or Huo Qubing exceed him?" Subsequently, Li Xiaogong was put in charge of the region, and Li Jing served as his assistant. it was said that Li Jing contributed much in pacifying the region after the region had seen much bloodshed for years.

In 625, Eastern Tujue attacked Taiyuan, and Li Jing led some of his troops north to resist Eastern Tujue. It was said that all of the other Tang generals were defeated by Eastern Tujue forces, but Li Jing was able to preserve his troops. In 626, when Eastern Tujue attacked again, Li Jing was made the commandant at Ling Prefecture (, roughly modern Yinchuan, Ningxia), and he tried to cut off Eastern Tujue's return path, although soon Tang and Eastern Tujue made peace. It was said that at this time that Li Shimin, then engaged in an intense rivalry with his older brother Li Jiancheng the Crown Prince and fearing that Li Jiancheng might be intending to kill him, solicited advice from Li Jing and Li Shiji, and both refused to speak on the matter, drawing respect from Li Shimin for their unwillingness to be involved in an internecine struggle. In 626, Li Shimin set a show down for Li Jiancheng and another brother, Li Yuanji the Prince of Qi at Xuanwu Gate, killing them, and then effectively forced Emperor Gaozu to create him crown prince and then pass the throne to him (as Emperor Taizong).

During Emperor Taizong's reign Li Jing continued to serve in Emperor Taizong's administration, and was soon made the minister of justice. In 628, in addition to that post, he also became acting Zhongshu Ling () – the head of the legislative bureau of the government (), a post considered one for a chancellor. In 629, he was made the minister of war.