 When his father was killed in a coup led by the general Yuwen Huaji in 618, Yang Jian and his two sons were also killed.Yan Jian was born in 585, during the reign of his grandfather Emperor Wen.He was the second son of Emperor Wen's son Yang Guang the Prince of Jin and Yang Guang's wife Princess Xiao.