It was said that Pei Zunqing was ambitious but mild in his disposition, and he was studious and careful in his behavior in his youth. When he had become relatively old for a new official, he, on account of his heritage, was made the legal officer at Lu Prefecture (潞州, in modern
Changzhi,
Shanxi). Because of his relatively old age, he was not noticed, but was eventually summoned to the Tang capital
Chang'an to serve in the ministry of civil service affairs (吏部,
Libu), and then to serve as
Dali Cheng (大理丞), the secretary general of the supreme court (大理寺,
Dali Si). It was said that he was capable in judging cases and decided them logically. On one occasion, because the general Xiao Keji (蕭克濟) was harsh toward his subordinates, his soldiers made comments that suggested they were suggesting rebellion. When they were charged with treason, Pei responded, "They had no money to gather people, and no talent to command people. How could they commit treason?" It was said that because of Pei's judgment, tens of households were saved. Later, late in
Emperor Xuanzong's
Tianbao era (742–756), Pei served as a junior official at the ministry of civil service affairs and was in charge of selecting the junior officials. It was said that because the realm was peaceful at times, each year there would be tens of thousands of people coming to Chang'an seeking official commissions. Pei was said to be dexterous, knowledgeable, good in memory, detailed, and not harsh, despite the large amount of work he had to carry out, and was said to be the best at the task. During this period, he wrote a work known as the ''Records of the Kings' Governance
(王政記), discussing the rites from ancient days to his own days; it was said that those who read the work saw that he had talent to be a high-level official. Toward the end of the Tianbao'' era, the chancellor
Yang Guozhong was exceedingly powerful, and he sent most officials who were not his followers away from the capital. As Pei did not flatter Yang, he was sent out of the capital to serve as a commandery governor. == During Emperor Suzong's reign ==