The religion of Islam has been a major influence on the culture and traditions of the Hui people. Early "jiaofang" or "religious communities," were formed with a dozen to several hundred households around a central mosque. An imam presided over the religious affairs of the community as well as over all aspects of its members’ livelihood, collecting levies and other taxes from them. During the last stage of the Ming Dynasty and the early years of the Qing Dynasty (1644-1911), as the Hui developed an intensified agricultural economy, some of the more important imams built up considerable wealth, bought land, and began renting it to tenant farmers.
The Hui practice many Islamic customs. Soon after birth, a baby is given a Hui name by an ahung. Wedding ceremonies and funerals are also presided over by an ahung. The deceased must be buried promptly, without a coffin, after being washed and wrapped in a white cloth. There is a taboo against wailing at a funeral, because that would be regarded as a form of complaint against the dead. Before meals, the Hui must wash their hands with water, and before attending religious services, they perform either a "minor cleaning" of the face, mouth, nose, hands and feet, or a "major cleaning" of the whole body. Men wear white or black skull caps, particularly during religious services, and women wear black, white or green head scarves.
Outside marriage is not encouraged by the Hui. A non-Hui youth who wishes to marry a Hui must convert to Islam. The marriage feast typically consists of 8 to 12 dishes, the even number symbolizing that the new couple will permanently remain a pair.
Visitors are served infused tea and fruit or home-made cakes, and welcomed by all members of a family. If the guest is from far away, he or she will be accompanied far beyond the boundaries of the village when departing.