was allowed to rejoin the civil service and appointed as the Administrator () of Shanggu Commandery (上谷郡; around present-day Yanqing District, Beijing) and later as the Administrator of Hanyang Commandery (漢陽郡; around present-day Tianshui, Gansu). While he was in office, Qiao Xuan heard that Huangfu Zhen (), the Prefect () of Shanggui County (上邽縣; in present-day Tianshui, Gansu), was guilty of corruption. He had Huangfu Zhen arrested, flogged, and head shaved bald. Huangfu Zhen later died in Ji County (冀縣; present-day Gangu County, Gansu). This incident shocked everyone in the region. Around the time, Qiao Xuan heard of Jiang Qi (), a famous man who lived in Shanggui County, and wanted to recruit him to join the civil service. Jiang Qi claimed that he was ill and declined. Qiao Xuan was angered, so he sent Yin Yi () to pressure Jiang Qi into agreeing. He threatened to make Jiang Qi's mother marry another man if he refused again. Yin Yi conveyed Qiao Xuan's threat to Jiang Qi but Jiang still declined and claimed that he was sick. The Counsellors () in the commandery came to see Qiao Xuan and managed to persuade him to stop forcing Jiang Qi. This incident became the subject of jokes at the time. Qiao Xuan resigned on the grounds that he was ill. Shortly after, he joined the civil service again as a Chief Clerk () to the Minister over the Masses (). He was subsequently promoted to Court Architect (). Towards the end of the reign of Emperor Huan ( 146–168), the Xianbei, Southern Xiongnu and Goguryeo often made incursions into Liaodong. Qiao Xuan was appointed General Who Enters Liao(dong) () and put in charge of defending Liaodong. He served there for three years, repelled intrusions by the invaders, and maintained peace in the area. In the early reign of Emperor Ling ( 168–189), Qiao Xuan was summoned to the imperial capital Luoyang, where he served consecutively as the Intendant of Henan (), Minister Steward () and Minister Herald (). In 170, he was promoted to Minister of Works () and later to Minister over the Masses (). He could not get along well with Chen Qiu (), the Administrator of Nanyang Commandery (南陽郡; around present-day Nanyang, Henan), but when he was in the two top ministerial positions, he recommended Chen to serve as the Minister of Justice (). Qiao Xuan saw that the