
The military history of the Sui and Tang dynasties encompasses the period of Chinese military activity from 581 to 907. Although the Sui dynasty preceded the Tang, it was extremely short lived, ending in 618. The two dynasties share many similar trends and behaviors in terms of military tactics, strategy, and technology. It can therefore be viewed that the Tang continued the Sui tradition, or that the Sui set the precedent for the Tang dynasty.

Annan was the southernmost province of Tang China from 679 to 866. Annam is the Vietnamese form of the Chinese name Annan, which means "the Pacified South" or "to pacify the South", a clipped form of the full name, the "Protectorate General to Pacify the South" Chinese: 安南都護府; pinyin: Ānnán Dūhùfǔ; Vietnamese: An Nam đô hộ phủ.

The Beiting Protectorate-General, initially the Beiting Protectorate, was a Tang dynasty protectorate created in 702 to control the Beiting region north of Gaochang in contemporary Xinjiang. Wu Zetian set up the Beiting Protectorate in Ting Prefecture and granted it governorship over Yi Prefecture (Hami) and Xi Prefecture (Gaochang). The Beiting Protectorate ended in 790 when Tingzhou was conquered by the Tibetan Empire. The ruins, along with tother sites along the Silk Road, were inscribed in 2014 on the UNESCO World Heritage List as the Silk Roads: the Routes Network of Chang'an-Tianshan Corridor World Heritage Site.

The Four Garrisons of Anxi were Chinese military garrisons installed by the Tang dynasty between 648 and 658. They were stationed at the Indo-European city-states of Qiuci (Kucha), Yutian (Hotan), Shule (Kashgar) and Yanqi (Karashahr). The Protectorate General to Pacify the West was headquartered in Qiuci.

Jiangjunmiao is a ruin and fossil site in Changji Hui Autonomous Prefecture, Xinjiang, China.

The Tang dynasty in Inner Asia was the expansion of the Tang dynasty's realm in Inner Asia in the 7th and, to a lesser degree, the 8th century AD, in the Tarim Basin, across the Gobi Desert and into Central Asia. Wars were fought against the Gokturk Empires and Xueyantuo, but also against the states of the Tarim basin. This expansion was not steady; for example, the Tang did lose control of the Tarim basin temporarily to the Tibetans in the 680s, and their expansion north of the Gobi was thwarted in 682. Emperor Taizong's military success was, in part, a consequence of changes he initiated in the Chinese army, including improved weaponry. The emperor placed a new emphasis on cavalry, which was very important because his non-Chinese opponents used the horse effectively in warfare.

Tĩnh Hải quân or the Jinghai Military Command, also known as Annam (安南) was a Tang dynasty-polity ruled by Chinese governors, then became a quasi-independent regime ruled by successive Vietnamese warlords and monarchs. It centered around what is now northern Vietnam from 866 to 967 during the late Tang period and lasted to late Five Dynasties and Ten Kingdoms period until the Vietnamese ruler Đinh Bộ Lĩnh eventually established the kingdom of Đại Việt.
The military of the Tang Dynasty was staffed with a large population of Turkic soldiers, referred to as Tujue in Chinese sources. Tang elites in northern China were familiar with Turkic culture, a factor that contributed to the Tang acceptance of Turkic recruits. The Tang emperor Taizong adopted the title of "Heavenly Kaghan" and promoted a cosmopolitan empire. Turkic soldiers that served under the Tang dynasty originated from the Eastern Turkic Khaganate. It began with Tang dynasty Emperor Taizong who sent his general Li Jing, eventually ended in defeating the Eastern Turks and capturing their leader Jiali Khan. Taizong regularly recruited and promoted military officers of Turkic ancestry, whose steppe experience contributed to the western and northern expansion of the Tang empire. The Turkic general Ashina She'er participated in the Tang capture of the Karakhoja, Karasahr, and Kucha kingdoms in Xinjiang. The half-Turkic general An Lushan started a revolt that led to the decline of Tang Dynasty.