At one point, Ru Zhang (茹璋) the prefect of Wei Prefecture recommended him to be the magistrate of Fuli County (符離, in modern Suzhou, Anhui).
Emperor Daizong was concerned about this, and the official Yan Wu (嚴武) recommended Cui Gan to be the prefect of Li Prefecture (利州, in modern Guangyuan, Sichuan) to combat the banditry.
Subsequently, in 764,[2] Yan Wu was made the military governor of Jiannan Circuit, and as he was heading to his post, he went through Li Prefecture.
Zhang agreed, and Yan commissioned Cui as the prefect of Han Prefecture (漢州, in modern Deyang, Sichuan).
His deputy Du Ji (杜濟) served as acting military governor after his death, but there were competing recommendations for his permanent replacement.
His advances were stymied by a sudden snowstorm that killed many of his soldiers and animals, however, and Cui then made a surprise attack, defeating him and forcing him to flee back to Chengdu.
When Du arrived at Chengdu, Cui treated him with the utmost formal respect but did not permit him any actual control over the governance.
In response, Du repeatedly recommended to Emperor Daizong to let Cui become military governor while placating Bo, Yang, and Li Changkui by making them prefects of their prefectures.
Emperor Daizong reluctantly agreed, although he initially made Cui only the mayor of Chengdu Municipality and the military commander, under Du.
Meanwhile, Cui also assured of his position by giving large bribes to Du's powerful chancellor colleague Yuan Zai.
[4] Meanwhile, it was said that because Xichuan Circuit had natural defenses and was rich, Cui grew arrogant of his position and gathered great wealth.
Yang argued that even if Cui were able to successfully defeat Tufan and Nanzhao forces, it would be even more difficult to move him later on; instead, he suggested that imperial guard soldiers and elite soldiers from Lulong Circuit (盧龍, headquartered in modern Beijing) -- who had followed their military governor Zhu Ci to Chang'an when Zhu was made chancellor—be sent to fight the Tufan and Nanzhao forces, and once the campaign was over, Xichuan would be back in imperial control.
Subsequently, Yang claimed that the northern border needed a senior general—someone like Cui—to defend it, and had Cui made the military governor of Shuofang Circuit (朔方, then headquartered in modern Yan'an, Shaanxi).
By 783, Emperor Dezong was waging a number of campaigns against several military governors to the east who were not following imperial orders—Zhu Ci's brother Zhu Tao, Wang Wujun, Tian Yue, and Li Na.
He summoned soldiers from Jingyuan Circuit (涇原, headquartered in modern Pingliang, Gansu) to Chang'an, ready to send them to join the campaigns in the east.
When the Jingyuan soldiers arrived at Chang'an, however, they were displeased at the lack of imperial awards, and they mutinied, forcing Emperor Dezong to flee to Fengtian (奉天, in modern Xianyang, Shaanxi).
He had Wang make a secret report to Emperor Dezong that on the way to Fengtian, Cui had frequently stopped to defecate or urinate and appeared to be waiting for Zhu Ci's soldiers.
As a result, Emperor Dezong, who was initially set to make Cui's family members slaves and confiscate his assets, did neither.
[3] In 796, Cui's former subordinate Han Tan (韓潭), then a military governor himself, offered to give up an honorary title he had in exchange to be posthumously declared innocent.