In the first year of Baoying (762), during the Anshi Rebellion, Luoyang and Chang 'an were recovered in the name of Marshal of Military Forces. In the first year of Guangde (763), Tubo captured Chang 'an, and Li Yu fled to Shanzhou, and later defeated Tubo with the famous Guo Ziyi.
In the 14th year of Dali (779), Li Yu died in Chenzi Inner Hall of Daming Palace. Xiaowu, Wen Rui, posthumous title, whose temple number is Ancestral Hall, was buried in Yuanling (Tanshan Mountain, 30 miles northwest of Fuping County, Shaanxi Province).