The well known Cao clan had a significant influence on the politics of Dunhuang during the period from the Western Han dynasty to the Song. The Cao clan in Dunhuang had two origins——the Central Plain and the Sogdians of Central Asia. In this paper the author examines the origins of the two Cao clans and the development of their power, and the origins of Cao Yijin, the commander of the Guiyi Army. He concludes that the family of Cao Yijin was descended from the Sogdian Cao clan from Central Asia, and that after he became commander of the Guiyi Army Cao Yijin pretended to be a descendant of the Cao family of Jiao prefecture in order to raise the status of his family. The regime established by the Guiyi Army and headed by the Cao family in fact consisted mainly of Sogdians. The culture of Dunhuang revealed by manuscripts found at the Mogao Grottoes was the product of various nationalities, predominantly the Sogdians.