唐高宗
Yuan Qianyao was from Xiang Prefecture (相州, in modern Handan, Hebei). His family traced its ancestry to the Northern Wei official Yuan He, who was a prince of the Xianbei state Southern Liang. His ancestors later served as officials of Northern Zhou and Sui Dynasty. Yuan Qianyao's grandfather Yuan Shimin () served as deputy minister of justice during Sui, while his father Yuan Zhixin () served as the minister of justice under Emperor Gaozong of Tang, but was, for offenses lost to history, exiled to the Lingnan region and died there. Yuan Qianyao passed the imperial examinations, although it is not known when that occurred.