Emperor Yuan of Han, personal name Liu Shi (劉奭; 75 BC – 8 July 33 BC), was an emperor of the Chinese Han dynasty. He reigned from 48 BC to 33 BC. Emperor Yuan promoted Confucianism as the official creed of the Chinese government. He appointed adherents of Confucius to important government posts.

However, at the same time that he was solidifying Confucianism's position as the official ideology, the empire's condition slowly deteriorated due to his indecisiveness, his inability to stop factional infighting between officials in his administration, and the trust he held in certain corrupt officials. He was succeeded by Emperor Cheng.

Family background When Emperor Yuan was born Liu Shi in 75 BC, his parents Liu Bingyi and Xu Pingjun were commoners without titles. Bingyi was a great-grandson of Emperor Wu, and his grandfather Liu Ju was Emperor Wu's crown prince, until Emperor Wu's paranoia forced him into a failed rebellion in 91 BC while Bingyi was still just an infant. The aftermath of the failed rebellion was that Prince Ju committed suicide and his entire family was executed. Bingyi was spared because of his young age, but became a commoner and survived on the largess of others. One of his supporters was chief eunuch Zhang He, who had been an advisor for Prince Ju before his rebellion, and who was punished by being castrated.

Around 76 BC, Zhang wanted to marry his granddaughter to Bingyi, but his brother Zhang Anshi (), then an important official, opposed his decision, fearing that it would bring trouble to his family. Zhang, instead, invited one of his subordinate eunuchs (who had also been castrated by Emperor Wu), Xu Guanghan (), to dinner, and persuaded him to marry his daughter Xu Pingjun to Liu Bingyi. When Xu's wife heard this, she was furious and refused her permission, but because Zhang was Xu's superior, Xu did not dare to renege on the promise. Bingyi and Pingjun were married in a ceremony entirely paid for by Zhang (because Bingyi could not afford the cost). Zhang also paid the bride price. After their marriage, Bingyi heavily depended on his wife's family for support.

Childhood and career as a crown prince Shi was less than a year old when something very unusual happened to his father. Shi's great-granduncle, Emperor Zhao(漢昭帝), had died that year and the regent, Huo Guang(霍光), having been dissatisfied with his initial selection of Prince He of Changyi, deposed Prince He and offered the throne to the commoner Bingyi instead. Bingyi accepted and took the throne as Emperor Xuan. Shi's mother Xu Pingjun was made empress as they were the descendants of Emperor Wu Of Han.

This action would cost Empress Xu her life, however, and cost Prince Shi his mother. Huo Guang's wife, Xian (), would not be denied her wish of making her daughter Huo Chengjun () an empress. In 71 BC, Empress Xu was pregnant when Lady Xian came up with a plot. She bribed Empress Xu's female physician Chunyu Yan (), under guise of giving Empress Xu medicine to help ease her pain and control blood flow after she gave birth, to poison Empress Xu. Chunyu did so, and Empress Xu died shortly after she gave birth. Her doctors were initially arrested to investigate whether they cared for the empress properly. The Emperor deep mourned for his beloved wife and would look to the case for many years to follow and in 66 BC and he would later kill the entire family except Empress Huo. That would make Lady Xian, alarmed and she informed Huo Guang what had actually happened, and Huo, not having the heart to turn in his wife, instead agreed to Chunyu's release.

In April 70 BC, Emperor Xuan made Huo Chengjun empress. Accustomed to luxury living, her palace expenditures far exceeded the late Empress Xu.

Huo Chengjun becoming empress was a threat to Prince Shi's life. On 24 May 67 BC,wushen day of the 4th month of the 3rd year of the Di'jie era, per vol.25 of Zizhi Tongjian Emperor Xuan made the eight-year-old Prince Shi into Crown Prince and awarded Empress Xu's father and Prince Shi's grandfather, Xu Guanghan, the title of Marquess of Ping'en. Huo Guang opposed these actions. Huo's wife, Lady Xian was shocked and displeased, because if her daughter ever had a son, why would he only be forever a prince and not the future emperor. She instructed her daughter to murder the crown prince. Allegedly, Empress Huo did make multiple attempts to do so, but failed each time. Around this time, the emperor also heard rumours that the Huos had murdered Empress Xu, which led him to begin stripping the Huos of actual power, while giving them impressive titles.

In 66 BC, after there had been increasing public rumours that the Huos had murdered Empress Xu, Lady Xian finally revealed to her son and grandnephews that she had, indeed, murdered Empress Xu. In fear of what the emperor might do if he had actual proof, Lady Xian, her son, her grandnephews, and her sons-in-law formed a conspiracy to get the emperor deposed. The conspiracy was discovered, and the entire Huo clan was executed by Emperor Xuan. Empress Huo was striped of all her titles but not executed, but Emperor Xuan decided 12 years later that he wanted her to be exiled; in response, she committed suicide.

What Empress Huo tried to do influenced Emperor Xuan in his choice of the next Empress. At the time, his favoured consorts were consort Hua, consort Zhang, and consort Wei, each of whom he had children with. He almost settled on Consort Zhang as his new empress. However, he hesitated, remembering how Empress Huo had tried to murder the crown prince. He therefore resolved to making an empress who was childless and kind. He decided on the gentle Consort Wang, and made her empress in 64 BC. Emperor Xuan put Prince Shi in her care, and she cared for him well.

Empress Wang would have a role in Crown Prince Shi's eventual choice of a wife. In the middle of the 50s BC, Consort Sima, the favourite consort of Prince Shi, died from an illness. Prince Shi was grief-stricken and became ill and depressed. Emperor Xuan was concerned, so he had Empress Wang select the most beautiful of the young ladies in waiting and had them sent to Prince Shi. Wang Zhengjun was one of the ladies in waiting chosen. With her, he had his first-born son Liu Ao (劉驁, later Emperor Cheng) c. 51 BC. Prince Ao became Emperor Xuan's favourite grandson and often accompanied him.

During his years as crown prince, Prince Shi did not have a major role in governing the country, given the forceful nature of his father. He was taught the Confucian classics by a succession of Confucian scholars during his pre-teen and teenage years. Prince Shi became a mild-mannered and strict adherent of Confucian principles, unlike his father who made effective use of both Legalist and Confucian principles in his governance. This would bring his father's ire on him.

In 53 BC, when Emperor Xuan and Prince Shi were having dinner, he suggested that Emperor Xuan employ more Confucian officials in key positions. Emperor Xuan became extremely angry and commented that Confucian scholars were impractical and could not be given responsibilities, and further commented that Emperor Yuan's reign would lead to the downfall of the Liu imperial clan, words that would turn out to be prophetic. This would also bring his father to consider changing the succession plans, as he was also disappointed by Prince Shi's general lack of resolve. He considered making Prince Shi's younger brother, Liu Qin, the Prince of Huaiyang, crown prince instead. However, he could not bring himself to do so, remembering how Prince Shi's mother, Empress Xu, was his first love and had been murdered by poisoning, and also how he depended on his father-in-law in his youth. Prince Shi's position therefore was not seriously threatened.

In 49 BC, Emperor Xuan became seriously ill. Before his death, he commissioned his cousin-once-removed Shi Gao (), Prince Shi's teacher Xiao Wangzhi (:zh:蕭望之), and Xiao's assistant Zhou Kan () to serve as regents. After he died, Prince Shi ascended the throne as Emperor Yuan.

Reign as emperor As emperor, Emperor Yuan immediately started a regimen of reducing governmental spending, with the objective of reducing the burdens of the people. He also started a program for social assistance to provide stipends for the poor and also for new entrepreneurs. Contrary to his father's governing philosophy, he relied heavily on Confucian scholars and put them into important governmental positions.

In 48 BC, Emperor Yuan made Consort Wang Zhengjun, the mother of his first-born son, Prince Ao, empress. On 17 June 47 BC,dingsi day of the 4th month of the 2nd year of the Chu'yuan era, per vol.28 of Zizhi Tongjian he made Prince Ao crown prince.

In 46 BC, alarmed at the high human and monetary cost of occupying Hainan and suppressing the frequent native rebellions, Emperor Yuan decreed that the two commanderies on the island be abandoned. Similarly, in 40 BC, alarmed at the high cost of maintaining imperial temples, he reduced the number of standing temples.

Factionalism Early in Emperor Yuan's administration a factional schism developed, a phenomenon that would plague his entire reign and cause officials to concentrate on infighting rather than effective governance. One faction included mainly Confucian scholars, his teachers, Xiao and Zhou, aligned with an imperial clan member who was also a Confucian scholar, Liu Gengsheng (劉更生, later named Liu Xiang 劉向), and imperial assistant Jin Chang (). The other faction was his cousin-twice-removed Shi, imperial secretary Hong Gong () and chief eunuch Shi Xian (). Hong Gong and Shi Xian are recorded as being the Emperor's favourites. Yuan gave them both key administrative positions, which eventually proved disastrous as they plotted the deaths of many officials who opposed them.

The Confucian faction derived their power from the fact that Emperor Yuan trusted and respected their advice. The "court faction" derived their power from their physical closeness to the emperor and their key roles in processing reports and edicts for Emperor Yuan. Policy-wise, the Confucian faction advocated returning to the ancient policies of the early Zhou dynasty, while the court faction advocated keeping the traditions of the Han dynasty.

In 47 BC, Hong and Shi used procedural traps which led to Zhou and Liu being demoted to commoners and Xiao retired. Later that year, the court faction further pressed Xiao into committing suicide. They did this by tricking Emperor Yuan into deciding to have Xiao investigated for inducing his son to make a petition for him, something considered inappropriate. Hong and Shi calculated that Xiao would rather commit suicide than face an investigation, and that was what Xiao did. As a result, the court faction prevailed. Consistent with his personality, Emperor Yuan rebuked Hong and Shi harshly for misleading him and buried Xiao with great honour, but did not punish Hong (who died later that year) and Shi.

In 46 BC, Emperor Yuan summoned Zhou back to his administration and gave him a mid-level office, along with Zhou's student Zhang Meng (張猛, a grandson of the great explorer Zhang Qian). Despite the relatively low positions that Zhou and Zhang had, their advice was highly valued by Emperor Yuan. In 44 BC, he promoted the highly regarded Confucian scholar Gong Yu (), who tried not to engage himself in factional politics, to the position of vice prime minister, and heeded many of his suggestions to further reduce governmental spending and to encourage the study of Confucianism.