In 725, Pei became the prefect of Ji Prefecture (濟州, roughly modern Liaocheng, Shandong). That year, Emperor Xuanzong offered sacrifices to heaven and earth at Mount Tai, and as he went through the various prefectures, the prefectural prefects were rushing to offer him tributes—but Emperor Xuanzong was impressed by three prefects—Wang Qiu (), Cui Mian (), and Pei, who offered no luxury items—and in Pei's case, what he offered was several hundred suggestions, all of which were aiming toward correcting Emperor Xuanzong's behavior. Emperor Xuanzong was particularly impressed with one of the suggestions, which stated, If you cause great harm to the people, then you cannot say that the realm is peaceful. Emperor Xuanzong promoted the three of them—in Pei's case, to be the prefect of the more important Ding Prefecture (定州, roughly modern Baoding, Hebei). At the time that his promotion was announced, he was overseeing a project to repair the Yellow River levees. Instead of departing immediately for Ding Prefecture, he delayed his departure to make sure that the levees would be complete. He later successively served as the prefect of Xuan (宣州, roughly modern Xuancheng, Anhui) and Ji (冀州, roughly modern Hengshui, Hebei, note different prefecture than his previous post) Prefectures, before being recalled to Chang'an to serve as the deputy minister of census (戶部侍郎, Hubu Shilang).