Emperor Xianwen of the Northern Wei Dynasty, Tuoba Hong, was a devout Buddhist who focused entirely on self-cultivation and had no time for state affairs. Taking advantage of this, the minister Yi Hun seized control of the government. In 471 AD, Empress Feng, the wife of Emperor Wencheng, executed Yi Hun and forced Tuoba Hong to abdicate the throne to his son, Tuoba Hong (the crown prince).
Tuoba Hong was only four years old when he ascended the throne. His mother was killed when he was very young, and his grandmother, Empress Dowager Feng, raised him. After Tuoba Hong became emperor, he was known as Emperor Xiaowen, and Empress Dowager Feng was granted the title of Grand Empress Dowager. She ruled from behind the court for twenty years, and history refers to her as "Empress Dowager Wenming."
After Empress Feng's death, Tuoba Hong regained control of the court. Having been deeply influenced by Han Chinese culture since childhood, he had a thorough understanding of it. He believed that for the Northern Wei Dynasty to achieve lasting peace and stability, it was essential to absorb and utilize Han culture while reforming the backward customs of the Northern Wei. When the Northern Wei was established, its capital was set at Pingcheng (present-day northeast of Datong, Shanxi). By the time Emperor Xiaowen came to power, Pingcheng had served as the capital for nearly a century. Tuoba Hong discovered that Pingcheng's remote location made it extremely difficult for the Northern Wei government to control the Central Plains region. Moreover, the northern nomadic Rouran tribe was growing increasingly powerful, posing a considerable threat to Pingcheng. Additionally, Pingcheng had poor soil and a dry climate, unsuitable for crop cultivation, and its grain production could no longer meet demand, relying instead on supplies from the Central Plains. Luoyang was the political and economic center at the time, and if the capital were moved there, the court would be much safer. For these reasons, Emperor Xiaowen decided to relocate the capital to Luoyang.
Emperor Xiaowen was well aware that the conservative ministers in the court would certainly oppose his decision to move the capital. However, to consolidate the Northern Wei regime, relocating the capital was absolutely necessary. To resolve this conflict, he devised a very clever plan.
During an early morning court session, Emperor Xiaowen told his ministers, "I want to lead troops to attack the Southern Qi."
The ministers all expressed that the Southern Qi dynasty was quite powerful, and if they rashly launched an attack, it would likely be difficult to achieve victory. Among these ministers, Prince Rencheng, Tuoba Cheng, opposed it most vehemently.
Emperor Xiaowen was furious and said impatiently, "I am the ruler of this nation; if I want to send troops, I will send troops. Who are you to criticize me?"
Tuoba Cheng said: "Your Majesty is the ruler of the nation, and your words are imperial decrees. However, as a minister of the state, it is my duty to advise against your risky military campaign."
Emperor Xiaowen announced the end of the court session and later summoned Tuoba Cheng to the palace. He said to Tuoba Cheng, "Actually, my anger earlier was just an act—I only wanted to intimidate the civil and military officials. To be honest, I intend to launch a political reform, but Pingcheng is not the right place for it. Only by moving the capital can we reform our outdated customs. My proposal to attack the Qi state was merely a pretext to relocate the capital to Luoyang."
After hearing this, Tuoba Cheng immediately expressed his agreement with Emperor Xiaowen's decision to move the capital. As the most vehement opponent among the ministers to the campaign against the Southern Qi, once he stopped opposing, the other ministers fell silent as well.
Thus, in 493 AD, Emperor Xiaowen of the Northern Wei Dynasty personally led an army of 300,000 troops southward from Pingcheng. Upon arriving in Luoyang, it began to rain continuously for an entire month. Since the Southern Qi Dynasty was located south of Luoyang, Emperor Xiaowen, undeterred by the muddy and difficult roads, continued to order the army to advance southward.
The ministers came before Emperor Xiaowen and urged him not to continue marching south.
Emperor Xiaowen said, "This time we have mobilized an army of three hundred thousand for a long and arduous campaign. If we stop advancing now, wouldn't all our efforts be in vain? How could we face our people? How about this: we relocate the capital here, which would count as a meaningful outcome of this campaign. What do you all think?"
After hearing this, none of the ministers knew how to respond. Emperor Xiaowen then said, "Make your decision quickly. Those who do not agree with moving the capital, stand on the right; those who agree, stand on the left."
A minister said, "As long as Your Majesty does not order a southward campaign, we agree to move the capital to Luoyang." Although many ministers did not favor relocating the capital, they now had only two options, and for them, moving the capital was far better than continuing the southward advance. Thus, they all expressed support for the relocation.
Afterwards, Emperor Xiaowen sent Tuoba Cheng back to Pingcheng to explain the benefits of moving the capital to the princes and nobles there. Some were persuaded, but most nobles still opposed the relocation. Later, Emperor Xiaowen personally returned to Pingcheng to discuss the matter with the noble ministers who opposed the move. They raised many objections, but Emperor Xiaowen refuted them all.
In 495 AD, the Northern Wei Dynasty officially moved its capital to Luoyang. Subsequently, Emperor Xiaowen implemented numerous reform measures that promoted the development of the Northern Wei and made significant contributions to the ethnic integration of northern China.