Ziying of Qin

Ying Ziying, also known as Ziying, King of Qin (Chinese: 秦王子嬰; pinyin: Qín-wáng Zǐyīng, died c. January 206 BC), was the third and last ruler of the Qin dynasty of China. He ruled over a fragmented Qin Empire for 46 days, from mid-October to early December 207 BC. Unlike his predecessor, he ruled as a king instead of emperor. He is referred to in some sources with the posthumous name Emperor Shang of Qin (秦殤帝) although the Qin dynasty had abolished the tradition of according posthumous names to deceased monarchs.
There is no firm consensus as to what Ziying's relationship to the Qin royal family really was.
He is mentioned in historical records as either:
While Sima Qian's Records of the Grand Historian does not specify Ziying's age, it implies that he had at least two sons, whom he consulted.
According to the analysis of historian Wang Liqun, the maximum possible age of Ziying when Zhao Gao assassinated Qin Er Shi was 19. Therefore, his sons would have probably been around the ages of 1–2 and so it was not possible for him to consult them.
For Ziying's sons to be old enough to be consulted, a traditional age for them would have been around 14–16. Since they were 14–16 in 207 BC, when their supposed great-grandfather (i.e. three generations apart from them) Qin Shi Huang (born 259 BC), if he had been alive, that he could have been only 52 is highly improbable.
It seems unlikely that Ziying was either Fusu's son or any other grandson of Qin Shi Huang.
Ziying being another elder brother of Huhai (Qin Er Shi) is as unlikely as a grandson of Qin Shi Huang. Since Huhai showed no restraint at killing at least 20 of his siblings after ascending to the throne, sparing one elder brother is possible but rather incredible.
Li Kaiyuan in his study stated that Qin Shi Huang only had three brothers of any kinds: one paternal half-brother (Chengjiao) and two maternal half-brothers (sons of Lao Ai), therefore Ziying, if indeed being another brother of his, would have had more mentions in Chengjiao's supposed betrayal.
Ziying being Zhao Chengjiao's son bore no threat to Huhai's reign and was neither one of Qin Shi Huang's direct descendants nor in a higher position in the succession to Huhai. Ziying was also said to have tried to persuade Huhai not to kill Qin Shi Huang's other sons and daughters, which could have been a difficult task if he was among them.
After Qin Er Shi's death, Zhao Gao chose Ziying to be successor and changed the ruling title "emperor" back to "king" because the Qin dynasty then was as weak as the former Qin State, which no longer ruled the whole of China but held onto only Guanzhong.
Ziying was the only person in the Qin imperial court to defend and to try to persuade Qin Er Shi against the wrongful executions of Meng Tian and Meng Yi. He lured Zhao Gao, the regent who had assassinated Qin Er Shi, into a trap and killed him. Ziying later surrendered to Liu Bang, the leader of the first group of rebel forces to occupy Xianyang, the Qin capital. He was eventually killed, along with his male family members, by another rebel leader, Xiang Yu.
Ziying sometimes appears as a door god in Chinese and Taoist temples, usually paired with his successor, Emperor Yi of Chu.
According to the assessment by Han dynasty historian Jia Yi (200–169 BCE), Ziying of Qin was a mediocre sovereign. Historian Ban Gu (AD 32–92) disagreed; he believed Ziying of Qin enthroned the dynasty under its last lag, and he achieved everything he could by assassinating Zhao Gao, the conspiring eunuch that caused the political chaos in the first place, and surrendered the kingdom to the rebel forces, preventing further loss of life and dignity.