Emperor Zhaozong of Tang
Sang Weihan was born in 898, during the reign of Emperor Zhaozong of Tang. He was from the Tang Dynasty eastern capital Luoyang — as his father Sang Gong () was a "guest general" (客將, "kejiang") under Zhang Quanyi, the mayor of Henan Municipality (河南, i.e., the Luoyang region). (The fact that Sang Gong was described as a "guest general" suggests that Sang Gong himself was not from Luoyang or vicinity, but later joined Zhang's army after first having served under another warlord.)