linguistic:voice_change, quality:corruption, stylistic:tone
Rise to power

In the Sixteen Kingdoms period, the Tuoba family of the Xianbei were the rulers of the state of Dai (Sixteen Kingdoms). Although it was conquered by the Former Qin, the defeat of the Former Qin at the Battle of Fei River resulted in the collapse of the Former Qin. The grandson of the last prince of Dai Tuoba Shiyijian, Tuoba Gui restored the fortunes of the Tuoba clan, renaming his state Wei (now known as Northern Wei) with its capital at Shengle (near modern Hohhot). Under the rule of Emperors Daowu (Tuoba Gui), Mingyuan, and Taiwu, the Northern Wei progressively expanded. The establishment of the early Northern Wei state and the economy were also greatly indebted to the father-son pair of Cui Hong and Cui Hao. Tuoba Gui engaged in numerous conflicts with the Later Yan that ended favorably for the Northern Wei after they received help from Zhang Gun that allowed them to destroy the Later Yan army at the Battle of Canhe Slope. Following this victory, Tuoba Gui conquered the Later Yan capital of Pingcheng (modern-day Datong). That same year he declared himself Emperor Daowu.

Due to Emperor Daowu's cruelty, he was killed by his son Tuoba Shao, but crown prince Tuoba Si managed to defeat Tuoba Shao and took the throne as Emperor Mingyuan. Though he managed to conquer Liu Song 's province of Henan, he died soon afterward. Emperor Mingyuan's son Tuoba Tao took the throne as Emperor Taiwu. Due to Emperor Taiwu's energetic efforts, Northern Wei's strength greatly increased, allowing them to repeatedly attack Liu Song. After dealing with the Rouran threat to his northern flank, he engaged in a war to unite northern China. With the fall of the Northern Liang in 439, Emperor Taiwu united northern China, ending the Sixteen Kingdoms period and beginning the Northern and Southern dynasties period with their southern rivals, the Liu Song.

Even though it was a time of great military strength for the Northern Wei, Rouran harassment from the north forced them to divert their focus from their southern expeditions. After uniting the north, Emperor Taiwu also conquered the powerful Shanshan kingdom and subjugated the other kingdoms of Xiyu (Western Regions). In 450, Emperor Taiwu once again attacked the Liu Song and reached Guabu (瓜步, in modern Nanjing, Jiangsu), threatening to cross the river to attack Jiankang, the Liu Song capital. Though up to this point, the Northern Wei military forces dominated the Liu Song forces, they took heavy casualties. The Northern Wei forces plundered numerous households before returning north.

At this point, followers of the Buddhist Gai Wu (蓋吳) rebelled. After pacifying this rebellion, Emperor Taiwu, under the advice of his Daoist prime minister Cui Hao, proscribed Buddhism — the first of the persecutions of Chinese Buddhism known as the Three Disasters of Wu. At this late stage in his life, Emperor Taiwu meted out cruel punishments, which led to his death in 452 at the hands of the eunuch Zong Ai. His death sparked off turmoil that only ended with the ascension of Emperor Wencheng later that same year. Wang Yu, an ethnic Qiang court eunuch and the favourite of Empress Dowager Wenming, patronized Buddhism lavishly. He constructed Cave 9–10, the most highly decorated of the Yungang Grottoes, and had a temple constructed in 488 at Lirun, Fengyi (modern day Chengcheng), which was his birthplace according to the Booke of Wei. Wang Yu may have been castrated during the suppression of a 446 Qiang rebellion since the Northern Wei would castrate rebel tribes' young elite.

In the first half of the Northern Wei dynasty, the Xianbei steppe tribesmen who dominated northern China kept a policy of strict social distinction between them and their Han subjects. Ethnic Han were drafted into the bureaucracy, employed as officials to collect taxes, etc. However, the Han were kept out of many higher positions of power. They also represented the minority of the populace where centers of power were located.