 He entered government service as a clerk of the palace library, eventually rising to the rank of director over the course of 30 years.As director of the imperial library, Xi Zheng was a fairly high-ranking official in the Shu government.The powerful eunuch Huang Hao was ambivalent towards him, so Xi Zheng was able to avoid the factionalism that Huang Hao's rise to power engendered.