The Northern Wei (Chinese: 北魏; pinyin: Běi Wèi), also known as the Tuoba Wei (拓跋魏), Later Wei (後魏), or Yuan Wei (元魏), was a dynasty founded by the Tuoba clan of the Xianbei, which ruled northern China from 386 to 534 (de jure until 535). Described as "part of an era of political turbulence and intense social and cultural change",[7] the Northern Wei Dynasty is particularly noted for unifying northern China in 439: this was also a period of introduced foreign ideas; such as Buddhism, which became firmly established. Many antiques and art works, both Daoist and Buddhist, from this period have survived. During the Taihe period (477-499) of Emperor Xiaowen, court advisers instituted sweeping reforms and introduced changes that eventually led to the dynasty moving its capital from Datong to Luoyang, in 494. It was the time of the construction of the Yungang Grottoes near Datong during the mid-to-late 5th century, and towards the latter part of the dynasty, the Longmen Caves outside the later capital city of Luoyang, in which more than 30,000 Buddhist images from the time of this dynasty have been found. The Tuoba renamed themselves the Yuan as a part of systematic Sinicization. Towards the end of the dynasty there was significant internal dissension resulting in a split into Eastern Wei and Western Wei.

After Former Qin's emperor Fu Jiān was defeated by Jin forces at the Battle of Fei River in his failed bid to unify China, the Former Qin state began to break apart. By 386, Tuoba Gui, the son (or grandson) of Tuoba Shiyijian (the last Prince of Dai), reasserted Tuoba independence initially as the Prince of Dai. Later he changed his title to the Prince of Wei, and his state was therefore known as Northern Wei. In 391, Tuoba Gui defeated the Rouran tribes and killed their chief, Heduohan, forcing the Rouran to flee west.

Initially Northern Wei was a vassal of Later Yan, but by 395 had rebelled and by 398 had conquered most of Later Yan territory north of the Yellow River. In 399 Tuoba Gui he declared himself Emperor Daowu, and that title was used by Northern Wei's rulers for the rest of the state's history. That same year he defeated the Tiele tribes near the Gobi desert

The officials did not receive salaries, but were expected to requisition the necessities of their lives directly from the people they governed. As the empire's history progressed, this appeared to be a major contributing factor leading to corruption among officials. Not until the 2nd century of the empire's existence did the state begin to distribute salaries to its officials.

Empresses were not named according to imperial favors or nobility of birth, but required that the candidates submit themselves to a ceremony where they had to personally forge golden statues, as a way of discerning divine favor. Only an imperial consort who was successful in forging a golden statue could become the empress.

All men, regardless of ethnicity, were ordered to tie their hair into a single braid that would then be rolled and placed on top of the head, and then have a cap worn over the head.

When a crown prince is named, his mother, if still alive, must be forced to commit suicide. (Some historians do not believe this to be a Tuoba traditional custom, but believed it to be a tradition instititued by the founding emperor Emperor Daowu based on Emperor Wu of Han's execution of his favorite concubine Consort Zhao, the mother of his youngest son Liu Fuling (the eventual Emperor Zhao), before naming Prince Fuling crown prince.)

As a result, because emperors would not have mothers, they often honored their wet nurses with the honorific title, "Nurse Empress Dowager" (保太后, bǎo tài hòu).

As sinicization of the Northern Wei state progressed, these customs and traditions were gradually abandoned.

At each of these levels, leaders that were associated with the central government were appointed. In order for the state to reclaim dry, barren areas of land, the state further developed this system by dividing up the land according to the number of men of an age to cultivate it. The Sui and Tang Dynasties later resurrected this system in the 7th century.[8]

During the reign of Emperor Daowu (386-409), the total number of deported people from the regions east of Taihangshan (the former Later Yan territory) to Datong was estimated to be around 460,000. Deportations typically took place once a new piece of territory had been conquered.[8]

As the Northern Wei state grew, the emperors' desire for Han Chinese institutions and advisors grew. Cui Hao (381-450), an advisor at the courts in Datong played a great part in this process.[8] He introduced Han Chinese administrative methods and penal codes in the Northern Wei state, as well as creating a Taoist theocracy that lasted until 450. The attraction of Han Chinese products, the royal court's taste for luxury, the prestige of Chinese culture at the time, and Taoism were all factors in the growing Chinese influence in the Northern Wei state. Chinese influence accelerated during the capital's move to Luoyang in 494 and Emperor Xiaowen continued this by establishing a policy of systematic sinicization that was continued by his successors. Xianbei traditions were largely abandoned. The royal family took the sinicization a step further by changing their family name to Yuan. Marriages to Chinese families were encouraged. With this, Buddhist temples started appearing everywhere, displacing Taoism as the state religion. The temples were often created to appear extremely lavish and extravagant on the outside of the temples.[8] Also from 460 onwards the emperor's started erecting huge statues of the Buddha carved near their capital Pingcheng which declared the emperors as the representatives of the Buddha and the legitimate rulers of China.[9]

The Northern Wei started to arrange for Han Chinese elites to marry daughters of the XianbeiTuoba royal family in the 480s.[10] Some Han Chinese exiled royalty fled from southern China and defected to the Xianbei. Several daughters of the Xianbei Emperor Xiaowen of Northern Wei were married to Han Chinese elites, like Princess Lanling 蘭陵公主 to Liu Hui 刘辉, who was a descendant of Liu Song royalty who fled north to the Xianbei in exile, Princess Huayang 華陽公主 to Sima Fei 司馬朏, a descendant of Jin dynasty (265–420) royalty, Princess Jinan 濟南公主 to Lu Daoqian 盧道虔, Princess Nanyang 南阳长公主 to Xiao Baoyin 萧宝夤, a member of Southern Qi royalty.

A Buddhist stela from the Northern Wei period, build in the early 6th century.

The heavy Chinese influence that had come into the Northern Wei state which went on throughout the 5th century had mainly affected the courts and the upper ranks of the Tuoba aristocracy.[8] Armies that guarded the Northern frontiers of the empire and the Xianbei people who were less sinicized began showing feelings of hostility towards the aristocratic court and the upper ranks of civil society.[8] Early in Northern Wei history, defense on the northern border against Rouran was heavily emphasized, and military duty on the northern border was considered honored service that was given high recognition. After all, throughout the founding and the early stages of the Northern Wei, it was the strength of the sword and bow that carved out the empire and kept it. But once Emperor Xiaowen's sinicization campaign began in earnest, military service, particularly on the northern border, was no longer considered an honorable status, and traditional Xianbei warrior families on the northern border were disrespected and disallowed many of their previous privileges; these warrior families who had originally being held as the upper-class now found themselves considered a lower-class on the social hierarchy.

In 523, rebellions broke out on six major garrison-towns on the northern border and spread like wildfire throughout the north. These rebellions lasted for a decade. Exacerbating the situation, Empress Dowager Hu poisoned her own son Emperor Xiaoming in 528 after Emperor Xiaoming showed disapproval of her handling of the affairs as he started coming of age and got ready to reclaim the power that had been held by the empress in his name when he inherited the throne as an infant, giving the Empress Dowager rule of the country for more than a decade. Upon hearing the news of the 18-year-old emperor's death, the general Erzhu Rong, who had already mobilised on secret orders of the emperor to support him in his struggle with the Empress Dowager Hu, turned toward Luoyang. Announcing that he was installing a new emperor chosen by an ancient Xianbei method of casting bronze figures, Erzhu Rong summoned the officials of the city to meet their new emperor. However, on their arrival, he told them they were to be punished for their misgovernment and butchered them, throwing the Empress Hu and her candidate (another puppet child emperor Yuan Zhao) into the Yellow River. Reports estimate 2,000 courtiers were killed in this Heyin (Ho-Yin) massacre on the 13th day of the second month of 528.[11]

Mounted warrior of the Northern Wei Dynasty from the collections of the Musée Cernuschi.

Erzhu dominated the imperial court thereafter, the emperor held power in name only and most decisions actually went through the Erzhu, although he did put out most of the rebellions, largely reunifying the Northern Wei state. However, Emperor Xiaozhuang, not wishing to remain a puppet emperor and highly wary of the Erzhu clan's widespread power and questionable loyalty and intentions towards the throne (after all, this man had ordered a massacre of the court and put to death a previous emperor and empress before), killed Erzhu Rong in 530 in an ambush at the palace, which lead to a resumption of civil war, initially between Erzhu's clan and Emperor Xiaozhuang, and then, after their victory over Emperor Xiaozhuang in 531, between the Erzhu clan and those who resisted their rule. In the aftermath of these wars, two generals set in motion the actions that would result in the splitting of the Northern Wei into the Eastern and Western Wei.

General Gao Huan was originally from the northern frontier, one of many soldiers who had surrendered to Erzhu, who eventually became one of the Erzhu clan's top lieutenants. But later, Gao Huan gathered his own men from both Han and non-Han troops, to turn against the Erzhu clan, entering and taking the capital Luoyang in 532. Confident in his success, he set up a nominee emperor on the Luoyang throne and continued his campaigns abroad. The emperor, however, together with the military head of Luoyang, Husi Chun, began to plot against Gao Huan. Gao Huan succeeded, however, in keeping control of Luoyang, and the unfaithful ruler and a handful of followers fled west, to the region ruled by the powerful warlord Yuwen Tai. Gao Huan then announced his decision to move the Luoyang court to his capital city of Ye. "Within three days of the decree, 400,000 families--perhaps 2,000,000 people--had to leave their homes in and around the capital to move to Yeh as autumn turned to winter."[12] There now existed two rival claimants to the Northern Wei throne, leading to the state's division in 534-535 into the Eastern Wei and Western Wei.

^Charles Holcombe, A History of East Asia: From the Origins of Civilization to the Twenty-First Century, p 68 Cambridge University Press, 2011

^Empress Dowager Hu initially declared Emperor Xiaoming's "son" (actually a daughter) emperor, but almost immediately after admitted that she was actually female and declared Yuan Zhao emperor instead. Emperor Xiaoming's unnamed daughter was therefore arguably an "emperor" and his successor, but is not commonly regarded as one. Indeed, Yuan Zhao himself is often not considered an emperor.

^The Northern Wei imperial prince Yuan Hao, under support by rival Liang Dynasty's troops, declared himself emperor and captured the capital Luoyang in 529, forcing Emperor Xiaozhuang to flee. Yuan Hao carried imperial title and received pledges of allegiance from provinces south of the Yellow River for about three months before Erzhu Rong recaptured Luoyang. Yuan Hao fled and was killed in flight. Due to the briefness of Yuan Hao's claim on the throne and the limited geographic scope of his reign, he is usually not counted among the succession of Northern Wei emperors.