Muslims first arrived in China sometime during the 7th Century AD. The Arabs defeated the Chinese at the Talas River in 751 AD. This was the only battle between Arab Muslim forces and the Chinese Empire. The Chinese were led by Kao Hsien-Chih, who won earlier battles in Gilgit and in the Farghana region. After the battle of the Talas River, the Muslim forces did not pursue the Chinese into central Asia. The Battle of Talas was minor from a military standpoint. However, in this battle, the Muslims captured Chinese papermakers, who introduced paper making into Central Asia and Europe.
Over half of China's Muslims are from the Hui people. They are ethnically and culturally indistinguishable from the Han majority in China, except for their Islamic faith and practices. The Hui live throughout China, in every province and major city. There are large populations of Hui in the Ninxia Hui Autonomous Region of Central China. The Hui are famous in China as good businessmen and national masters of the martial arts, e.g. Wushu.
At times, Muslims were able to rebell against the Chinese Empire and establish independent Sultanates, see the entries on Du Wenxiu and Yaqub Beg.
China's other Muslims are from various [mostly Turkic] ethnic groups and live in China's northwest. This group includes the Uigurs, the Kazakhs, the Salars, the Tadjiks, the Kyrgyz, the Uzbeks, the Tatars, the Bao'an, and the Dongxiang.
There are four major historical periods of Islam in China.
1. The "Gedimu," or Traditional Chinese Islam, which comes from the Arabic word "qadim," which translates as "old". The first period of Islam began when Muslim merchants and officials came to China from Arabia, Persia, Central Asian, and Mongolia. These people settled in various places in China from the 7th to the 14th century AD. Most of the Hui trace their ancestry to these early visitors.
2. The Sufi tariqas, began to make an impact in China in the 17th Century AD. There are four major Sufi tariqas in China. The largest is the Naqshbandiyya, which has two major branches: the Naqshbandi-Jahriyya and the Naqshbandi-Khufiyya.
3. The third period of Islam in China is the "Yihewani" (from the Arabic word "Ikhwan," meaning "Brotherhood"). This was a reformist movement, which arrived in China in the late 19th century. About 20% of Hui are affiliated with the Yihewani movement.
4. The fourth period of Islam in China is that of ethnic nationalism, which was the result of government policies in China since 1979. The Chinese government has identified many nationalities within China, including the Hui, the Uigurs, and the Kazakhs. The identification as minority nationalities within China is generally accepted by these groups resulting in Muslim nationalism. Contacts between Muslims in China and Muslims in the Middle East and elsewhere have grown stronger since the late 1970's.
Source: "Muslim Chinese: Ethnic Nationalism in the People's Republic," by Dru C. Gladney (Harvard University Press, 1991).