The official history "Old History of the Five Dynasties" stated that his family was originally descended from Shi Que (), an official of the Spring and Autumn period state Wey, through the Han prime minister Shi Fen (), and further stated that Shi Fen's descendants fled west when Han fell, settling in what would eventually become Gan Prefecture (甘州, in modern Zhangye, Gansu), apparently in an attempt to try to link Shi with a Han Chinese ancestry despite the Shatuo origin. Under the "Old History of the Five Dynasties" account, his great-great-grandfather, whose name was given as Shi Jing (), followed the Shatuo chieftain Zhuye Zhiyi () in submitting to Tang, and was settled, along with the rest of the Shatuo people under Zhuye, in Tang territory. Shi Jingtang's father Nieliji (), who was referred to by the Han Chinese name Shi Shaoyong (), was said to be a successful general under Zhuye Zhiyi's grandson Li Keyong, who was an important late-Tang warlord, and Li Keyong's son Li Cunxu, who ruled the independent state of Jin after Tang's fall. The other official history for the period, the "New History of the Five Dynasties", apparently was skeptical of this account of Shi Jingtang's ancestry, and instead merely gave Nieliji's name, further stating that it was unclear when or how he received the surname of Shi. Most likely, Shi Jingtang descended from the Shatuo sub-tribe Anqing (安慶), specifically, from the Shi clan (石) of ultimately Sogdian origin.