In 1907 Xinjiang was where the Qing assigned Yang Zengxin.[4] He effectively fabricated Xinjiang's boundaries in its modern form by having the posts of Altay minister, Tarbagatai cuoncilor and Ili general destroyed and having their self-rule directly to Beijing removed.[5]

Ma Yuanzhang, a SufiJahriyyaShaykh, gave his support for Yang Zengxin to seize power in Xinjiang. This enabled Yang to immediately raise a massive army of Hui Muslim troops, mainly from Jahriyya mosque communities.

Muslim Gen. Ma Anliang, in cooperation with magistrate Yang Zengxin, attempted to arrest and execute the Yihewani (Ikhwan in Arabic) leader Ma Wanfu. Ma Qi, one of Ma Anliang's subordinates, staged a rescue operation and brought Ma Wanfu to Xining.[6] Ma Anliang and Yang Zengxin were both monarchists and did not trust republicanism, and had served in the Qing military together.

Yang came to power after he defeated the revolutionaries who caused the last Qing dynasty governor, Yuan Dahua, to flee during the Xinhai Revolution in Xinjiang. The Ili revolutionaries and the Gelaohui were eliminated by Yang. He appointed Ma Fuxing as military commander of 2,000 Chinese Muslim troops, whose purpose was to crush Yang's rivals. In 1913 the revolt of Tömür Khälphä in Qumul was crushed by Yang Zengxin with the help of the Turpan based Ma Yuanzhang's religious representative "ra'is" Jin Yunlun 金云仑.[7] President Yuan Shikai recognized his rule and in return he supported Yuan's revival of the monarchy by inviting Republican anti-Yuan rebels to a banquet and decapitating them on New Year's Day, 1916. Yang believed monarchy was the best system for China, and some western travelers noted, with approval, that Yang was a former Mandarin, unlike the Republican governors of the other provinces.

Yang was made a Count of the First Rank (一等伯 Yī děng bó) by Yuan Shikai.

In 1917 President Li Yuanhong assigned Fan Yaonan (樊耀南) to observe him and, if possible, replace him. Yang always recognized whichever faction was in power in the Beiyang government to avoid trouble. His rule kept the region relatively peaceful, compared to other parts of China which were war-torn. However, he ruled dictatorially and executed many dissidents. Taxes for Kazakhs, Uighurs and other minorities were lowered. People were forbidden to abuse minorities, and warned his Muslim subjects on the Soviet Russians, saying, "Beware of associating themselves with a people who are entirely without religion and who would harm them and mislead their women".[8]

Yang relied heavily on Hui people—Chinese Muslims—to enforce his rule in Xinjiang. They were disliked by both Han and Uighurs because they had high positions within the Xinjiang military and government under Yang.[9]

On July 1, 1928, he recognized the Nationalist Government in Nanjing. Six days later he was killed in a coup attempt by Fan Yaonan during a banquet. Fan had risen high in Yang's regime, but Yang never trusted him. The motive seemed to be Yang's denial of the pro-Nationalist Fan into a Nationalist advisory council designed to keep Xinjiang in check. Yang's death was avenged by Jin Shuren almost immediately. Lacking resources to oust Jin, Nanjing recognized his succession to the governorship.

Ma Fuxing was appointed Titai of Kashgar from 1916-24 by Yang, who ordered Ma Shaowu to assassinate Ma Fuxing in 1924. Ma Shaowu was then appointed Daotai of Kashgar.

The third reason is that at the time that Turkic Muslims were waging
rebellion in the early years of the Guangxu reign, the ‘five elite
divisions’ that governor general Liu Jintang led out of the Pass were
all Dungan troops [Hui dui 回队]. Back then, Dungan military
commanders such as Cui Wei and Hua Dacai were surrendered
troops who had been redeployed. These are undoubtedly cases of
pawns who went on to achieve great merit. When Cen Shuying was
in charge of military affairs in Yunnan, the Muslim troops and
generals that he used included many rebels, and it was because of
them that the Muslim rebellion in Yunnan was pacified. These are
examples to show that Muslim troops can be used effectively even
while Muslim uprisings are still in progress. What is more, since the
establishment of the Republic, Dungan have demonstrated not the
slightest hint of errant behaviour to suggest that they may prove to
be unreliable.