 His marriage with Empress Yifu was said to be a happy one, as she was virtuous and beautiful, and Emperor Wen respected her greatly.She bore him 12 children, although only Yuan Qin and Yuan Wu () the Prince of Wudu survived infancy.In 538, with Western Wei under the threat of attack by Rouran, Yuwen first tried to alleviate the situation by marrying a daughter of a member of the imperial clan to Yujiulü Tahan (), the brother of Rouran's Chiliantoubingdoufa Khan Yujiulü Anagui, but then, believing that to be insufficient, he asked Emperor Wen to divorce Empress Yifu and marry Yujiulü Anagui's daughter.