Yuan Shanjian was born in 524. His father Yuan Dan the Prince of Qinghe was a son of the well-regarded Yuan Yi , also Prince of Qinghe and a son of . His mother Princess Hu was Yuan Dan's wife and was a granddaughter of Hu Zhen , an uncle of 's mother . Yuan Shanjian was Yuan Dan's oldest son, and was his heir apparent.
In 534, , a cousin of Yuan Shanjian's father Yuan Dan, seeking to resist the control of the paramount general Gao Huan, entered into an alliance with independent generals Yuwen Tai and Heba Sheng . When Gao, in response, marched toward the capital Luoyang, Emperor Xiaowu fled to Yuwen's territory. Yuan Dan initially joined Emperor Xiaowu on his flight, but quickly abandoned Emperor Xiaowu and returned to Luoyang. After Gao entered Luoyang, he had Yuan Dan assume acting imperial powers, and Yuan Dan began to become arrogant, viewing himself as the next emperor. Gao, who was in fact looking for a new emperor to replace Emperor Xiaowu, felt that Yuan Dan was inappropriate, and therefore, under the excuse that a cousin should not succeed another, chose Yuan Shanjian and declared him emperor . This formally divided Northern Wei into Eastern Wei and Western Wei .
During Gao Huan's lifetime
Gao Huan, believing that Luoyang was too close to the borders of Western Wei and Liang, moved the capital to , an important city firmly under his control. Viewing Emperor Xiaowu's flight as a blot on his person, Gao publicly showed Emperor Xiaojing the utmost respect for the rest of his life, and Gao's subordinates did not dare not to follow suit, although actual authority rested in the hands of Gao and other officials Gao delegated authority to. Gao also made repeated attempts to conquer Western Wei to reunify Northern Wei, but each time was repelled by Yuwen Tai or other Western Wei generals. Gao mostly remained at his headquarters in Jinyang , but made occasional visits to Yecheng. In 536, Gao put his son, Gao Cheng, in charge of the Eastern Wei government. Late that year, Emperor Xiaojing's father Yuan Dan died, and according to some historians , Gao assassinated him.
Emperor Xiaojing, was he grew, was described to be handsome and strong, capable of jumping over a fence while holding a stone lion. He was also said to be skillful at horseriding, archery, and literature. People compared him to his famed ancestor, Emperor Xiaowen.
In 539, Emperor Xiaojing took Gao Huan's as his empress.
In 544, Gao Cheng, wanting to place a trusted official to keep watch on Emperor Xiaojing, made his associate Cui Jishu Emperor Xiaojing's secretary. However, Emperor Xiaojing had a cordial relationship with Cui, who often revised submissions Gao made to Emperor Xiaojing and edicts Emperor Xiaojing issued to Gao Huan and Gao Cheng, to improve the style and content. Emperor Xiaojing frequently made the comment, "Cui is my wet nurse."
In 545, pursuant to Gao Huan's request, Emperor Xiaojing took the cousin of the khan of Tuyuhun, Murong Kualü , as a concubine, to try to enhance the relationship with Tuyuhun.
In 547, Gao Huan died, and Gao Cheng took over full power of the government.
During Gao Cheng's regency
In light of Gao Huan's death, the general Hou Jing, who did not respect Gao Cheng, first surrendered the 13 provinces he controlled (the region between the Huai River and Yellow River to Western Wei, and then to Liang. Gao Cheng's general Murong Shaozong , however, defeated both Xiao Yuanming -- nephew of Liang's , whom Emperor Wu sent to assist Hou -- and Hou, capturing Xiao Yuanming and forcing Hou to flee to Liang. By 548, all but four provinces were back under Eastern Wei control, and by 549, Eastern Wei had recaptured those provinces as well, after Gao Cheng captured Changshe .
Meanwhile, during the campaign against Hou, a conflict between Gao Cheng and Emperor Xiaojing would erupt. Gao Cheng was not as respectful to Emperor Xiaojing as Gao Huan was, and he ordered Cui Jishu to intensify his surveillance of Emperor Xiaojing. On one occasion, when Gao Cheng was attending a feast, he flashed a cup before Emperor Xiaojing as a toast -- a very disrespectful gesture, as a subordinate, when toasting the emperor, was supposed to kneel. Emperor Xiaojing became angry, and remarked, "There is no such thing as an everlasting empire. ''Zhen'' do not necessarily treasure my life!" Gao Cheng angrily responded, "''Zhen'', ''zhen'', ''zhen''! You are a ''zhen'' with dog feet!" He ordered Cui to punch Emperor Xiaojing three times, and then left abruptly. Emperor Xiaojing thereafter entered into a conspiracy with his teacher Xun Ji , Yuan Jin , Liu Siyi , Yuan Daqi the Prince of Huashan, Yuan Xuanhong the Prince of Huainan, and Yuan Hui the Prince of Jibei to consider overthrowing Gao Cheng. They dug a tunnel from within the palace to the outside of the city, intending to create a secret passage for imperial guards to go through, but the tunnel was discovered, and Gao Cheng entered the palace with his troops, arresting Emperor Xiaojing, putting him under house arrest, and executing the other members of the conspiracy.
In spring 549, Emperor Xiaojing was forced to create Gao Cheng the greater title of Prince of Qi, and give him the honorific office of ''Xiangguo'' , both signifying a move toward Gao's taking of the throne. Gao Cheng formally declined these honors, and further made a formal request for Emperor Xiaojing to create a son as crown prince. Subsequently, in fall 549, Emperor Xiaojing created his son Yuan Zhangren crown prince.
Also in fall 549, Gao Cheng was meeting Chen Yuankang , Yang Yin, and Cui Jishu, to secretly discuss the timeframe in which to take the throne, when his servant Lan Jing -- a son of the Liang general Lan Qin Gao Cheng captured in battle, and whom Gao Cheng had repeatedly threatened to kill -- assassinated Gao Cheng and Chen. Gao Cheng's brother the Duke of Taiyuan, who was also in Yecheng at the time, killed Lan Jing and his associates, and publicly declared only that Gao Cheng had been wounded. Emperor Xiaojing, however, believed that Gao Cheng was dead, and secretly made the remark, "It is heaven's will that the Grand Marshall is dead. The power to rule should return to the imperial clan."
During Gao Yang's regency
Gao Yang, however, quickly moved to consolidate power. He made a quick show of force, marching his personal guards of 8,000 men into the palace, and stating to Emperor Xiaojing that he was going to Jinyang -- where the military headquarters were. Emperor Xiaojing, seeing Gao Yang's intent on keeping power, turned pale and stated, "This man does not appear any more tolerant of me. I do not know when I will die." Gao Yang set up his headquarters in Jinyang, intending to control the military, and in spring 550, Gao Yang had Emperor Xiaojing create him the Prince of Qi Commandery -- a slightly lesser title than the one that his brother declined before his death. Just two months later, Gao Yang's title was changed to Prince of Qi.
Meanwhile, Gao Yang's associate Gao Dezheng was trying to persuade him to seize the throne. In summer 550, Gao Yang agreed, and he started advancing toward Yecheng, while sending Gao Dezheng to Yecheng to try to force the issue. Emperor Xiaojing bestowed Gao Yang the nine bestowments -- the traditional penultimate step before abdication. After Gao Yang arrived in Yecheng, with the officials Pan Le , Zhang Liang , and Zhao Yanshen sent by Gao Yang to request his abdication, Emperor Xiaojing did so, yielding the throne to Gao Yang, who established Northern Qi .
The new Emperor Wenxuan created the former emperor the Prince of Zhongshan, and gave him the special treatment of not having to declare himself a subject of the new emperor. He created his sister, the former empress, the Princess Taiyuan. The former emperor resided with the princess, and the princess, worried that her brother might do her husband harm, kept close watch on her husband, often tasting his food to make sure that it was not poisoned.
However, Emperor Wenxuan was apprehensive of the former emperor. Around the new year 552, Emperor Wenxuan invited the Princess Taiyuan to a feast inside the palace. As soon as she left her residence, Emperor Wenxuan sent assassins to force the former emperor to drink poisoned wine, and also killed his three sons. Emperor Wenxuan gave the former emperor the posthumous name of Xiaojing, and also buried him with imperial honors. However, at a later time, for reasons unknown, Emperor Wenxuan opened up the tomb and threw Emperor Xiaojing's casket into the Zhang River .
* ''Tianping'' 534-537
* ''Yuanxiang'' 538-539
* ''Xinghe'' 539-542
* ''Wuding'' 543-550
** Yuan Dan , Prince Wenxuan of Qinghe, son of Yuan Yi Prince Wenxian of Qinghe, son of Emperor Xiaowen of Northern Wei
** Princess Hu, Yuan Dan's wife
** , daughter of Gao Huan
* Major Concubines
** Consort Murong, cousin of Tuyuhun's khan Murong Kualü
** Consort Li, later concubine of Emperor Wucheng of Northern Qi
** Consort Pan
** Yuan Zhangren , the Crown Prince
** Two other sons, also killed by Emperor Wenxuan of Northern Qi 552