While at Luoyang, he had previously entered into incestuous relationships with three of his cousins—Yuan Mingyue (元明月) the Princess Pingyuan, the Princess Ande, and Yuan Jili (元蒺藜), who was also created princess. Yuan Mingyue accompanied him on his flight to Chang'an, but Yuwen disapproved of the relationship, and persuaded the imperial princes to arrest and kill her.
Around the new year 535, he drank wine spiked by poison—in all likelihood placed by Yuwen's assassins—and died. Yuwen made his cousin Yuan Baoju the Prince of Nanyang (Yuan Mingyue's brother) emperor (as Emperor Wen).