In fall 757, with joint forces of Tang, under overall command by Suzong's son Li Chu the Prince of Guangping, and Tang's allied Uyghurs, poised to attack Chang'an to recapture it from Yan forces. When the forces battled west of Chang'an, Tang forces initially suffered losses and was about to collapse. Li Siye, seeing this situation, took off his upper clothing and rode on his horse, battering fleeing soldiers with his staff, to stop the panic. With the panic under control, Tang forces counterattacked and defeated Yan forces, forcing them out of Chang'an and allowing Tang to recapture Chang'an. He also contributed to capturing Luoyang from An Lushan's son An Qingxu (who had assassinated An Lushan earlier in 757 and become the emperor of Yan). For Li Siye contributions, he was made the minister of army supplies (衛尉卿, "Weiwei Qing") and created the Duke of Guo. He was also given the rank of jiedushi.