Emperor Xiaowen of Northern Wei
It is not known when Yuan Qin was born. What is known is that he was the oldest son of Yuan Baoju the Prince of Nanyang, a grandson of Emperor Xiaowen of Northern Wei, by his wife Princess Yifu, and that he had one younger brother by Princess Yifu, Yuan Wu (元戊). Around the new year 535, Emperor Xiaowu of Northern Wei—a cousin of Yuan Baoju and the final emperor of the undivided Northern Wei state but who by now was only emperor over the western part of the state (i.e., Western Wei) -- was poisoned by the paramount general Yuwen Tai over a dispute developed when Yuwen disapproved of his incestuous relationship with Yuan Baoju's sister Yuan Mingyue (元明月). Yuwen Tai made Yuan Baoju the new emperor (as Emperor Wen). Emperor Wen created Princess Yifu empress, and created Yuan Qin crown prince. In 538, while both Emperor Wen and Yuwen Tai were away on a campaign against Eastern Wei, Yuan Qin was nominally put in charge of the capital Chang'an, although the official Zhou Huida (周惠達) was actually in charge. When former Eastern Wei captives, upon hearing initial news of Eastern Wei victories, rebelled within Chang'an with Zhao Qingque (趙青雀), Zhou and Li Hu (李虎) were forced to escort the crown prince out of Chang'an to flee the rebellion. Eventually, when Yuwen returned, Zhao's rebellion collapsed, and Emperor Wen and Yuan Qin were both able to return to Chang'an.