In 755, An Lushan rose against Emperor Xuanzong's rule, and Shi Siming served under him. Initially, the Tang commanderies north of the Yellow River nearly all submitted to An, allowing An to quickly advance south and capture the Tang eastern capital Luoyang, but around the new year 756, the official Yan Gaoqing (), who had earlier submitted to An, rose against An at Changshan Commandery (常山, roughly modern Shijiazhuang, Hebei), which he was governor of, leading to a flurry of other commanderies turning against An as well. An, who was then at Luoyang, sent Shi and Li Lijie () to attack Changshan and Boling (博陵, roughly modern Baoding, Hebei) Commanderies. Just eight days after Yan's defection, Shi and Cai Xide () both arrived at Changshan and captured Yan, who was delivered to Luoyang and executed. Shi, Li, and Cai then attacked the other commanderies that had risen along with Yan, and they resubmitted to An, who declared himself the emperor of a new state of Yan. Lu Quancheng (), the governor of Raoyang Commandery (饒陽, roughly modern Hengshui, Hebei), however, refused to submit, and Shi put Raoyang under siege but could not quickly capture it, and was forced to lift the siege when the Tang general Li Guangbi arrived with relief troops from Hedong Circuit. Subsequently, he and Li Guangbi and another Tang general, Guo Ziyi, engaged in a number of battles, largely to Shi's detriment, eventually causing many commanderies to rise against An again. This caused An much concern, and at one point, An considered abandoning Luoyang and heading back north. Eventually, however, the situation changed when the Tang general Geshu Han was defeated at Tong Pass by another Yan general, Cui Qianyou (), and Yan troops were able to capture Chang'an and force both Emperor Xuanzong and his crown prince Li Heng to flee—with Li Heng fleeing to Lingwu and declaring himself emperor there (as Emperor Suzong). Guo and Li Guangbi abandoned their campaign against Shi and went to Lingwu as well, thus allowing Shi to largely repacify the region north of the Yellow River for Yan. When Liu Zhengchen (), who had risen against An at Pinglu, made a surprise attack on Fanyang, Shi defeated Liu, forcing him to flee back to Pinglu.
