Early life: Li Shuyin's great-grandfather Li Shuheng 19 was admitted as a scholar, and his grandfather Li Biao finally joined the army and became a clerk in Xingzhou. Father's name is Li Si. When Li Shangyin was born, his father Li Sizheng was appointed as Jia County Magistrate. About three years old, Li Shangyin went to Zhejiang with Li Si. Li Si died before he was ten years old. Li Shangyin had to go back to his hometown with his mother and live a hard and poor life. At home, Li Shangyin is the eldest son, so he also bears the responsibility of supporting the portal. Li Shangyin mentioned in his article that he worked as a "bookseller" when he was a teenager, that is, copying books for others to make money to supplement his family. Li Shangyin recited scriptures at the age of five, and wrote an inkstone at the age of seven. After returning to his hometown, he learned classics from an uncle who was proficient in the Five Classics and elementary school. At the age of sixteen, he was named after his mastery of ancient Chinese. Besides, he writes beautiful work letters and good articles.
In the third year of Daiwa (829), he moved to Luoyang and got to know Bai Juyi, Ling Huchu and other predecessors.
In the seventh year of Daiwa (833), Ling Huchu was transferred to Beijing, and Shang Yin left Taiyuan for home.
In the second year of Kaicheng (837), Li Shangyin studied hard for a long time, and because of Ling's reputation, he got a scholar, released Brown, secretary of provincial studies, and made up for Hongnong.
At the end of the second year of Kaicheng (837), Li Shangyin was admitted to Jinshi, and Linghu Chu died of illness that year.
In the spring of the third year of Kaicheng (838), Li Shangyin took the official examination and was exempted from the examination.
After four years, in 839, Li Shangyin took the official-granting exam again, passed it smoothly, and got the position of provincial secretary. Soon, he was transferred to the county commandant of Hongnong (now Lingbao, Henan).
Five years later, in 840, he resigned again and was approved.
Huichang two years, in 842, managed to return to the secretary province.
In the third year of Huichang, in 843, Wang Maoyuan, Li Shangyin's father-in-law, died when Wu Zongchao crusaded against Serina Liu rebellion on behalf of the imperial court. king
In the fifth year of Huichang, in October of 845, Li Shangyin ended his filial piety and returned to the secretary province.
In the sixth year of Huichang, in 846, Li Shangyin was appointed as the secretary of Zhengzi Province. Thirty-five-year-old Li Shangyin finally had a son (Li Qiang).
In the first year of Dazhong, in 847, when Zheng Ya was invited to work in Guilin by the observation of Gui Guan, Li Shangyin almost went with him without hesitation.
In the first year of Dazhong, in March of 847, Li Shangyin bid farewell to his family and set out with Zheng Ya. After a journey of about two months, he came to the south about 5000 miles from Beijing.
In the second year of Dazhong, in 848, Li Shangyin returned to Chang 'an.
In 849, Li Shangyin was invited by Lu Hongzhi, the ambassador of Wuning Army, to work in Xuzhou.
In the fifth year, 85 1, Wang Xia, the wife of Li Shangyin, died of illness.
In the fifth year of college, 85 1, Li Shangyin accepted the post of joining the army. Li Shangyin simply took care of the family affairs and went to work in Sichuan in 1 1 month.
In the ninth year of Dazhong, in 855, Liu Zhongying was transferred back to Beijing. Out of concern, he arranged a promotion position for Li Shangyin. Although the grade is low, the treatment is rich.
At the end of the Middle Ages, in about 858, Li Shangyin died in Zhengzhou.