[1] Before joining the Qing in early 1645, he had successively served the Ming dynasty (1368–1644) and the short-lived Shun regime of rebel leader Li Zicheng (1602–1645).
[2] Along with other graduates who showed special literary promise, he became Hanlin bachelor, and was given a concurrent post of supervising secretary in the Ministry of War.
[3] On 13 April 1644, during an audience with the Chongzhen Emperor, he advised the monarch to summon the braves of Shandong to defend Beijing against approaching rebel troops led by Li Zicheng.
[4] He then served in Li's administration for a few weeks until Li was crushed in the Battle of Shanhai Pass in early June by the allied troops of the Manchu Dorgon, Prince Regent of the Qing dynasty, and Wu Sangui, a Ming general who let the Qing army enter the North China plain through Shanhai Pass.
After Dorgon's death on 31 December 1650, the Shunzhi Emperor (r. 1643–61) started to rule personally and announced his intention to purge corruption from officialdom.