Liu Yao (died 329), courtesy name Yongming, was the final emperor of the Xiongnu-led Han-Zhao dynasty of China. He became emperor in 318 after most other members of the imperial Liu clan were massacred by Jin Zhun in a coup. However, the empire was soon divided in half, as the general Shi Le declared independence and established the Later Zhao dynasty. In a decisive battle in early 329, Shi captured and executed him, and while his sons Liu Xi the Crown Prince and Liu Yin the Prince of Nanyang continued to hold out for nearly a year, the Han-Zhao state fell later that year.
Liu Yao's father Liu Lü () died early, and he was raised by Liu Lü's cousin Liu Yuan. When he was young, Liu Yuan became impressed with his intelligence and strength. As he grew, he became known for his archery skills and his studiousnessâÂÂalthough his studies were described to be surveys rather than careful readings, except for books on military strategy, which he spent much of his time on. He often deprecated Wu Han and Deng Yu, instead comparing himself to the great Warring States general Le Yi, the great Han dynasty prime minister Xiao He, and the Han general and official Cao Can (). When people heard these remarks, they often criticized him for being overly arrogant, but Liu Yuan's son Liu Cong respected him and remarked, "Yongming should be compared to Shizu (the temple name of Emperor Guangwu of Han) and Emperor Wu of Wei (Cao Cao); Le, Xiao, and Cao Can cannot be compared to him."
When Liu Yao was young, he, along with his cousin Liu Cong, were studying in the Jin capital Luoyang, when on one occasion he committed an unspecified crime punishable by death. He therefore fled to Chaoxian (, near modern Pyeongyang, North KoreaâÂÂnot, in this case, a generic geographic term for Korea). Later, after a general pardon, he returned, but decided to live in the mountains away from trouble.
After Liu Yuan declared himself the Prince of Han in 304, creating the Han state and effectively declaring independence and war on (Western) Jin, he made Liu Yao a major general. Liu Yao was probably created the Prince of Shi'an in 306, when Liu Yuan declared himself the emperor. During Liu Yuan's reign, Liu Yao engaged in many campaigns against Jin forces and often was victorious, although he, like other Han generals, had difficulty permanently holding cities that he captured. In 309, along with his cousin Liu Cong and Wang Mi, he attacked Luoyang, but was repelled.
After Liu Yuan's death in 310, Liu Cong overthrew his older brother and Liu Yuan's successor Liu He (after Liu He had tried to have him and the other brothers killed and successfully killed two) and succeeded to the throne himself as Emperor Zhaowu. He trusted Liu Yao greatly and commissioned him with a large force, and Liu Yao served his cousin faithfully.
In 311, Liu Yao, in conjunction with Wang, Shi Le, and Huyan Yan, captured Luoyang and Emperor Huai of Jin. He took Emperor Huai's sister-in-law, the deceased Emperor Hui's wife, Yang Xianrong, as his own wife.
Later that year, after Liu Cong's son Liu Can captured Chang'an, Liu Yao was put in charge of the Chang'an region, although he subsequently lost that city to Jin forces under Qu Yun (麴å Â), allowing the Jin prince Sima Ye (Emperor Huai's nephew) to occupy that city and subsequently declare himself emperor (as Emperor Min of Jin) in 313 after Liu Cong executed the former Jin emperor. In 312, while fighting Liu Kun the Jin governor of Bing Province (å¹¶å·Â, modern central and northern Shanxi) and his ally Tuoba Yilu the Duke of Dai in conjunction with Liu Can, Liu Yao suffered a serious injury and was almost captured or killed by Jin forces, but was able to escape after the general Fu Hu () yielded his own horse and sacrificed his own life in doing so.
For the next few years, Liu Yao fought largely inconclusive battles against Jin forces, both those directly under Emperor Min and those under Sima Bao the Prince of Nanyang. However, in 316, after Emperor Min's forces collapsed and Sima Bao failed to come to his aid, Liu Yao captured Chang'an and Emperor Min (whom Liu Cong subsequently executed in 318). For this accomplishment, Liu Cong created him the greater title of Prince of Qin.
Late in Liu Cong's reign, Liu Cong grew increasingly cruel and extravagant, as well as increasingly trusting eunuchs and the treacherous official Jin Zhun. In 318, as Liu Cong grew ill, he summoned Liu Yao and Shi Le to be regents for his son Liu Can, but both Liu Yao and Shi declined, perhaps not wishing to contest the authorities of Jin Zhun, whose daughters had sway with Liu Cong and Liu Can as their wives. Subsequently, when Liu Cong died later that year and Liu Can succeeded to the throne, Jin Zhun became powerful and overthrew Liu Can, slaughtering all members of the imperial Liu clan in the capital Pingyang (å¹³é½, in modern Linfen, Shanxi). In the massacre, Liu Yao lost his mother Lady Hu, brother, and (he thought at the time) his son and heir Liu Yin. (However, unknown to his father, Liu Yin fled but was captured by or sold to a tribe named Heiniyuju () as a slave.)
Upon hearing news of Jin Zhun's coup, Liu Yao and Shi each led their armies against Jin, catching him trapped between their forces. Meanwhile, senior Han princes and officials who escaped the Pingyang massacre offered the throne to Liu Yao, who accepted. He offered to not only spare Jin Zhun's life but continue to grant him power if Jin would surrender. However, when Jin Zhun was subsequently assassinated and succeeded by his cousin Jin Ming (