Duan Zhixuan and his father joined the rebellion led by Li Yuan that eventually overthrew the Sui dynasty in 617–618.
[2] Later, he became a subordinate to Li Shimin and took part in unification wars against various warlords including Xue Ju, Liu Wuzhou[3] and Wang Shichong.
[4] In 626, he was a key figure that helped Li Shimin obtain the crown in the Xuanwu Gate Incident.
[5] During the reign of Emperor Taizong, Duan Zhixuan served in different positions both in the military and in local government.
In those folk stories, Duan Zhixuan is one of four close guards (along with Ma Sanbao, Liu Hongji and Yin Kaishan) protecting Li Shimin.