This is a family tree of Chinese monarchs from the Northern and Southern dynasties period to the collapse of the Southern Song dynasty.

Southern and Northern Dynasties

Liu Song

Southern Qi

Liang dynasty and Western Liang

Chen dynasty

Northern Wei, Eastern Wei, Western Wei

Legend:

Northern Qi

Northern Zhou

Sui dynasty
The following is a simplified family tree for the Sui dynasty (隋朝), which ruled China between AD 581 and 618. The dynasty  was named for the family title: the Yang (楊) family were the Dukes of Sui.

Those who became emperor are listed in bold, with their years of reign large. The names given for emperors are posthumous names, the form by which Sui emperors were most commonly known.

Tang and Wu Zhou dynasties
The following is a simplified family tree for the Tang dynasty (唐朝), which ruled China between AD 618 and 907. The Tang dynasty was interrupted by the reign of Empress Wu Zetian (AD 690–705), who after deposing her sons, declared herself the founder of a Wu Zhou dynasty (武周); the Tang dynasty was resumed by her sons following her abdication. The dynasty was named for the family title: the Li (李) family were the Dukes of Tang.

The names given in bold for emperors are temple names, the form by which Tang emperors were most commonly known (with the exception of Shangdi/Shaodi (殤帝 / 少帝), whose posthumous titles mean simply "died young" and "the young emperor", and Aidi (哀帝), also known as Zhaoxuan (昭宣), neither of whom were awarded temple names). The names of Xuánzōng I (玄宗) and Xuānzōng II (宣宗) are originally different in Mandarin Chinese, but are rendered the same in Pinyin English transliteration (once the tones have been removed).

The Tang emperors claimed descent from people such as Li Guang and Laozi

Five Dynasties and Ten Kingdoms period
The fifty years between the fall of the Tang dynasty and the establishment of the Song dynasty were a time of upheaval known as the Five Dynasties and Ten Kingdoms period. During this period, five short-lived imperial dynasties ruled the heart of China, while a series of small independent kingdoms were established in the south.

Later Liang
The Later Liang ruled between 907 and 923.

Later Tang
The Later Tang ruled between 923 and 937.

Later Jin
The Later Jin ruled between 936 and 947.

Later Han and Northern Han
The Later Han ruled between 947 and 951. Liu Min, brother of Emperor Gaozu the founder of the Later Han, established the Northern Han kingdom, which ruled the area north of the Chinese heartland until it was overrun by Emperor Taizong of Song in 979.

Later Zhou
The Later Zhou ruled between 951 and 960.

Former Shu

Later Shu
The Later Shu kingdom gained independence from the Later Tang in 934, remaining an independent state until conquered by the Song dynasty in 965.

Wu and Southern Tang

The Wu kingdom existed as an independent state 907–937. In 937 Li Bian (also known as Xu Zhigao), at one point an adopted son of Yang Xingmi and later the adopted son of the paramount general Xu Wen, usurped power and established the Southern Tang kingdom, which remained an independent state until conquered by the Song dynasty in 975.

Wuyue

Min

Ma Chu

Southern Han

Jingnan

Song dynasty
The following is a simplified family tree for the Song dynasty, which ruled China between 960 and 1279. The names given are temple names, the form by which Song Emperors are most commonly known (with the exception of the last emperor, Bing, who is simply known by his given name). The Song dynasty is often divided into the Northern Song (960–1127), which ended when the Song lost control of Northern China to the Jin dynasty, and the Southern Song (1127–1279).

 
 – Northern Song emperors
 – Southern Song emperors
A dashed line denotes an adoption

Liao, Jin, Western Xia dynasties

Liao dynasty 
The following is a simplified family tree for the Liao dynasty, which ruled much of northern China between 907 and 1125. The names given are temple names, the form by which Liao Emperors are most commonly known (with the exception of the last emperor, Tianzuodi, who was not awarded a temple name).

Jin dynasty
The following is a simplified family tree for the Jin dynasty. Arising from a family of Jurchen chieftains (whose inaugural years of rule are given in brackets), the dynasty was declared by Aguda in 1115; in 1125 his successor Wuqimai conquered the Liao dynasty. The Jin ruled much of northern China until their conquest by the Mongol Empire 1234. They were the cultural 'ancestors' of the Qing dynasty, which was initially named the Later Jin in recognition of this heritage. The names given are temple names, the form by which Jin emperors are most commonly known (with the exceptions of the Prince of Hailing, Prince Shao of Wei and Emperor Mo; these are posthumous names, as temple names were not awarded).

Western Xia and Dingnan Jiedushi
The following is a family tree of the military governor (Jiedushi) of Dingnan Circuit, the region that eventually evolved into the independent state of Western Xia, that existed between 1038 and 1227, followed by the family tree of the Western Xia emperors.

The Tuoba clan of the Xianbei of Tuyuhun founded the Western Xia. After the Tibetans destroyed the Tuyuhun in 670, its famous prince, Tuoba Chici, who controlled the Dangxiang Qiang submitted to the Tang, which "bestowed" upon him the royal name of Li (李).  Towards the end of the Tang, the Tuoba brought troops to suppress the Huang Chao Rebellion (874–884) on behalf of the Tang court and took control of the Xia State, or Xia Zhou, in northern Shaanxi in 881. After the Tang fell in 907, the Tuoba descendants formally declared resistance against the expanding Northern Song in 982 and proclaimed independence to establish the Western Xia in 1038.

The foundation of Western Xia goes back to the year 982 under Li Jiqian.  However, only in 1038 did the Tangut chieftain Li Yuanhao (son of Li Deming, named himself emperor of Da Xia and demanded the Song emperor recognise him as an equal. The Song court recognised Li Yuanhao as governor but not as "emperor", a title it regarded as exclusive to the Song emperor. After intense diplomatic contacts, in 1043 the Tangut state accepted the recognition of the Song emperor as emperor in exchange for annual gifts, which implied tacit recognition on the part of the Song of the military power of the Tanguts.

References 

Chinese monarchs
Family trees of royalty
Family trees
Tangut history
Western Xia
Former monarchies of East Asia