Tuoba Jun was born in 440, when his father Tuoba Huang was the crown prince of his grandfather, . His mother Consort Yujiulü was the sister of the general Yujiulü Pi , who had been a member of the Rouran royal house but who had surrendered to Northern Wei. When he was little, he was much favored by his grandfather Emperor Taiwu, and often accompanied Emperor Taiwu, even on military campaigns. While he carried no official titles, he was known as the Prime Imperial Grandson . Around the new year 452, after his father Tuoba Huang had died in 451 after falling ill over his fear of false accusations by the eunuch Zong Ai, Emperor Taiwu created him the Prince of Gaoyang, but then reconsidered, believing that a princely title was inappropriate for his oldest grandson, and therefore cancelled the title -- signifying strongly that he intended for Tuoba Jun to succeed him.
However, Zong Ai, in fear that Emperor Taiwu would punish him over his false accusations against Crown Prince Huang, assassinated Emperor Taiwu in spring 452, and, skipping over Tuoba Jun, made Tuoba Huang's younger brother Tuoba Yu the Prince of Nan'an emperor. Zong controlled all important matters of state, and when Tuoba Yu, displeased about Zong's arrogance, tried to strip him of power in fall 452, Zong assassinated him as well. The officials Dugu Ni , Yuan He, Baba Kehou , and Buliugu Li, however, then overthrew Zong and executed him, making Tuoba Jun emperor at the age of 12, as Emperor Wencheng.
Immediately following Emperor Wencheng's taking the throne, it appeared that the high level officials began internecine struggles against each other, as for several years officials would be put into honored positions, only to be executed days or months later. These included senior officials held over from Emperor Taiwu's administration as well as those who had accomplished much in putting Emperor Wencheng on the throne, and included:
* Tuoba Shoule , chief commander
* Baba Kehou, a major participant in the coup bringing Emperor Wencheng to the throne
* Tuxi Bi , prime minister under Tuoba Yu
* Zhang Li , chief commander under Tuoba Yu
* Tuoba Zhouniu the Prince of Leling, chief commander
* Duguhun Yuanbao the Prince of Jingzhao
* Tuoba Chong the Prince of Jianning, Emperor Wencheng's granduncle, and his son Tuoba Li the Prince of Ji'nan
* Yujiulü Ruowen the Prince of Puyang
* Tuoba Ren the Prince of Yongchang, Emperor Wencheng's distant uncle
* Tuoba Ba the Prince of Leping, Emperor Wencheng's distant uncle
It appeared that Yuan He and Buliugu Li were the key victors out of these struggles, for not only did they not suffer during the infighting, but became exceedingly honored late in Emperor Wencheng's reign. Both they and Dugu Ni were created princes. Whether Emperor Wencheng himself was involved in these internecine struggles is unclear, although the edicts were issued in his name. Yuchi Juan , already a decorated general during Emperor Taiwu's reign, also became powerful.
Another characteristic of Emperor Wencheng's reign was that he often toured the provinces throughout his empire.
In winter 452, Emperor Wencheng's mother Consort Yujiulü died, and he subsequently posthumously honored his parents as emperor and empress.
Around the new year 453, Emperor Wencheng, a Buddhist, officially ended the prohibitions against Buddhism that Emperor Taiwu had instituted in 445 , and he personally performed tonsure on five monks. However, as per the traditions instituted by Emperor Taiwu, he also publicly received Taoist amulets in spring 454.
In spring 453, Emperor Wencheng honored his wet nurse Lady Chang as empress dowager, and treated her brothers as if they were his biological uncles.
In fall 454, Emperor Wencheng's concubine Consort Li gave birth to his oldest son . In 456, he created another imperial consort, , empress and created Tuoba Hong crown prince -- and then, pursuant to Northern Wei tradition, ordered Tuoba Hong's mother Consort Li to commit suicide.
In winter 458, Emepror Wencheng launched a major attack against Rouran, but considered abandoningit when his troops encountered a snow storm. At Weichi Juan's urging , however, Emperor Wencheng continued, and while he was not able to deal a major defeat to Rouran's Chuluo Khan Yujiulü Tuhezhen, a number of Rouran tribesmen surrendered. Meanwhile, in his absence, his generals Feng Chiwen and Pi Baozi engaged Liu Song forces near the Ji River , with inconclusive results.
In summer 460, Emperor Wencheng's wet nurse Empress Dowager Chang died.
Also in summer 460, based on advise given by Cao An the Marquess of Dingyang, Emperor Wencheng launched a major attack on Tuyuhun's khan Murong Shiyin , who had drawn Northern Wei officials' ire by accepting commissions by both Northern Wei and Liu Song and by showing off his wealth. The commanding generals were Emperor Wencheng's brother Tuoba Xincheng the Prince of Yangping and Li Hui the Duke of Nan Commandery. However, while the armies were able to capture a large number of livestock, Murong Shiyin received advance warning and was able to flee into the mountains, and the armies also suffered from illnesses.
In 464, while on one of his tours to various parts of the empire, Emperor Wencheng personally attended a Gaoche tribal ceremony to sacrifice to the heavens, and the Gaoche people were very pleased.
In summer 465, Emperor Wencheng died and was succeeded by his son Tuoba Hong . Power soon fell into the hands of the official Yifu Hun, who tried to monopolize power and executed a number of other officials, including Buliugu Li, but in 466 was in turn ambushed by Emperor Wencheng's wife Empress Dowager Feng.
* ''Xing'an'' 452-454
* ''Xingguang'' 454-455
* ''Tai'an'' 455-459
* ''Heping'' 460-465
** Tuoba Huang, Crown Prince Jingmu, posthumously honored as Emperor Jingmu, son of Emperor Taiwu of Northern Wei
** Consort Yujiulü, sister of Yujiulü Pi the Prince of Hedong, posthumously honored as Empress Gong
** , daughter of Feng Lang the Duke of Liaoxi, son of Feng Hong the emperor of Northern Yan. Burial: Empress Dowager Wenming tomb.
* Major Concubines
** Consort Li, mother of Crown Prince Hong
** Consort Li, mother of Prince Changle
** Consort Cao, mother of Prince Lüe
** Consort Juqu, mother of Prince Jian
** Consort Yifu, mother of Prince Ruo
** Consort Yue, mother of Prince Meng
** Consort Xuan, mother of Prince Anping
** Tuoba Hong , the Crown Prince , later Emperor Xianwen of Northern Wei
** Tuboa Changle , initially the Prince of Jianchang , later Prince Li of Anle
** Tuoba Lüe , Prince Zhuang of Guangchuan
** Tuoba Jian , Prince Shun of Qi Commandery
** Tuoba Ruo , died early, posthumously created Prince Xiao of Hejian
** Tuoba Meng , Prince Kuang of Anfeng
** Tuoba Anping , Prince Ai of Han, died early
** Princess Dunqiu
** Princess Wuyi
** Princess Jianxing
** Princess Pingyang