Chinese-speaking Muslims from Dzungaria and the Tarim Basin. They call themselves Lǎo Huíhuí: Old Muslims. Two devastating Huí revolts took place in China in the second half of the 19th century, resulting in very heavy casualties, destruction, and the mass emigration of the Huí to Sogdiana and Turkestan.
The Manchu-led Qīng empire had a very aggressive policy vis-à-vis the Dungans. However, it did not provoke any major migration of Dungans out of China before the Dungan revolts. As explained on p40 of TCE, the Qīng treated Muslims as second-class subjects. At the time of the Tàipíng Rebellion (second half of the 19th century), the Qīng allowed the Hàn to form armed militias to defend themselves. The Hàn of Dzungaria and the Tarim Basin also armed themselves, even if they were thousands of km away from the Tàipíng Rebellion. The Huí felt threatened and also started arming themselves. This escalation led to a very tense situation, which only needed a spark to become something worse. A trivial incident in 1862 gave start to the rebellion, which quickly spread as far east as Gānsù, where there were many capable Sufi leaders who joined the rebellion. In 1865, the Uyghurs joined the fray on the side of the Huí under their leader Yaqub Beg (see p40 of TCE), and soon the Qīng lost control of Dzungaria and the Tarim Basin. In 1867, the Qīng General Zuǒ Zōngtáng fought back using a carrot-and-stick strategy: on the one hand, massive amounts of money were invested in the region to promote agriculture and education; on the other hand, gun-carrying forces were sent to fight against the Muslim rebels (Chinese armed forces in the 19th century were still mostly relying on cold weapons!). After the first Qīng victories in 1871-2, skilful diplomacy brought back several Huí leaders into the loyalist camp. Despite repeated offers of amnesty in 1873, the war went on with many battles (mostly sieges), thousand of victims, and ethnic cleansing on both sides until 1877. In the end, the situation became so confused that the Uyghurs and the Huí started an internecine conflict, with the Hàn Chinese still in Dzungaria and in the Tarim Basin joining forces with the Uyghurs to exterminate the Huí, whilst the Russians to the north took advantage of the chaos to annex the territory around the city of Kulja in Dzungaria.
In the end, a combined force of Hàn soldiers and Huí former rebels defeated Yaqub Beg's forces and took back all lost territories. The Huí who fled to Central Asia were those who remained on the rebel side until the very end of the (first) Dungan Revolt.
A second Dungan Revolt took place in 1895-6. This time, the fighting was mostly between rival Sufi Naqshbandi orders amongst the Huí. It was put down by loyalist Muslims.