After the founding of the Mongol Empire by Genghis Khan (1162-1227 A.D.), Muslims, essentially craftsmen, scholars, and soldiers from Central Asia were forcibly relocated by Mongol rulers to help in the administration of the empire or to develop sciences such as calendar making and astronomy. These people, their number exceeding 100,000, were later settled mainly in northwest China.
During the Yuan Dynasty (1271—1368), Ananda (d 1307) the governor of northwestern China (part of Shanxi, Ningxia, Gansu and a part of Sichuan province) converted to Islam. Ananda was the grandson of the Yuan Dynasty founder Kublai Khan and a close descendent of Genghis Khan. An estimated 150,000 Mongol soldiers subsequently converted, furthering the spread of Islam in China’s northwestern areas. Muslims made great contributions to the establishment of the Yuan Dynasty and were given a high social status as direct patrons to the Mongols themselves. There were some 13 Muslim ministers holding key positions in the royal court. By end of Yuan Dynasty, Muslims had dispersed widely all over the territory of China.
In the early Ming dynasty (1368—1644), the number of Muslims kept increasing as their social and political status remained high. For instance, Zhu Yuanzhang (1328－1398) made great contributions to win over the Mongols and put down rebellions of minority ethnic groups against the Ming Dynasty. A Muslim navigator Zhonghe was sent by the Yongle Emperor seven times from 1405 and 1433 to Southeast Asian countries and Arabia to demonstrate the might of China and to establish good relations. During the first two centuries of the Ming Dynasty, Islam further expanded when Muslims settled in remote, unsettled regions. Mosques were built, and religious communities were found. In the same time, Muslims remained relatively concentrated in Shanxi, Gansu, Ningxia, Yunnan and Xinjiang. It was also in the Ming Dynasty that Muslims in China began to assimilate by speaking the Chinese language, adopting Chinese names, and learning local culture. Thus, the “Hui Hui” (i.e. Muslim) were no longer considered foreigners, but became indigenous Chinese citizens speaking Chinese language and bearing Chinese names. By end of Ming Dynasty, some brilliant indigenous Muslim scholars, such as Wang Daiyu (1584-1670) wrote in standard Chinese to further spread the concepts of Islam.