Du Ruhui
Du Yuanying was born in 769, during the reign of Emperor Daizong. Traditional histories indicate that he was from the same clan as the famous early-Tang Dynasty chancellor Du Ruhui, but provide conflicting accounts as to whether he was descended from Du Ruhui – with Du Yuanying's biography in the "Old Book of Tang" indicating that he was a "descendant" of Du Ruhui's; his biography in the "New Book of Tang" indicating that he was a fifth-generation descendant of Du Ruhui's; the table of the chancellors' family trees in the "New Book of Tang" indicating that he was a descendant of Du Ruhui's uncle Du Yan, who was himself a chancellor as well; and the "Zizhi Tongjian", apparently adopting that latter assertion, indicating that he was a descendant of Du Yan's. In any case, the Du clan claimed original ancestry from the Zhou Dynasty states Tang and Du and traced its ancestry to officials of Lu, Chu, Qin Dynasty, Han Dynasty, Cao Wei, Jin Dynasty (266–420), Sui Dynasty, and Tang. Neither Du Yuanying's great-grandfather Du Ziyuan (杜自遠) nor grandfather Du Fan (杜繁) was listed with any offices, although Du Yuanying's father Du Zuo (杜佐) served as a judge at the supreme court. Du Yuanying had at least one younger brother, Du Yuanjiang (杜元絳). Du Yuanying himself passed the imperial examinations late in the "Zhenyuan" era (785–805) of Emperor Daizong's son Emperor Dezong, and thereafter served on the staff of a regional governor.