As a child, Xiao Yuanshan accompanied the army and was captured by the Khitan forces when they invaded south. He ended up in the Liao lands. He was actually the son of Yang Yanzhao, a great general of the Song Dynasty, and the only surviving descendant of the Yang family of generals.