Little is known about Li Changyan's background, as neither of the official histories of the Tang dynasty (the
Old Book of Tang and the
New Book of Tang) contained a biography for him. It is known that as of 881, when Zheng Tian was serving as the military governor of Fengxiang and the overall commander against the major agrarian rebel
Huang Chao—after Huang had captured the imperial capital
Chang'an earlier that year and forced then-reigning
Emperor Xizong to flee to
Chengdu—Li Changyan was serving as the commander of the Fengxiang forces (行軍司馬,
Xingjun Sima) and stationed at Xingping (興平, in modern
Xianyang,
Shaanxi). Due to the indecisive nature of the warfare with Huang, who declared himself emperor of a new state of Qi, the Fengxiang treasury was becoming drained, and Zheng was giving less rewards to the soldiers than the soldiers expected and cutting down on the salaries. Li Changyan, knowing that the soldiers were displeased, fanned their discontent. In winter 881, he took his soldiers from Xingyuan back to Fengxiang's capital Fengxiang Municipality and poised to attack. Zheng, not wanting to have his forces battle each other, transferred his powers to Li Changyan and headed toward Chengdu to join Emperor Xizong, but on the way also offered to resign. Emperor Xizong gave Zheng the post of advisor to the
Crown Prince—a completely honorary post since there was no crown prince at the time—while making Li Changyan military governor. == As military governor ==