 Yuan Hao's father Yuan Xiang (元詳) was a son of Emperor Xianwen and a younger brother of Emperor Xiaowen, and was created the Prince of Beihai early in Emperor Xiaowen's reign.Yuan Xiang became powerful, as the prime minister, during the reign of Emperor Xiaowen's son Emperor Xuanwu, but was later accused of corruption and stripped of his titles.He died in imprisonment 504, and after his death, although his titles were stripped, Yuan Hao was allowed to inherit the title of Prince of Beihai.