Ma was born into the family of a Táozhōuahong of the Beizhuang menhuan, a Sufi order. At 11 years of age, he studied with a non-Muslim who was an examinationgraduate at the private academy he attended. He was introduced to the senior licentiate, Fan Shengwu, whose school was at New Taozhou. Ma placed second in the Táozhōu examination and fourth in the prefectural examination in Gongchang, achieving the rank of xiucai. He studied Neo-Confucian texts and the Han Kitab. Wang Daiyu, Ma Zhu, Liu Zhi, and others had synthesized Confucianism with Islam. Ma believed Muslims should use Chinese culture to understand Islam. He opened his own school, Gold Star Hall at a gongbei of his menhuan. He taught Islam, Chinese curriculum, and the Han Kitab. Ma became an independent instructor; the Khafiya Sufis called him heterodox or an infidel for his success and unconventional curriculum. The strife between Biezhuang and Hausi went to court in 1902, and the Taozhou subprefect proscribed Ma's teachings and beat his followers. The verdict was reversed by a higher court sympathetic to the Xidaotang. Ma set up a mosque in Taozhou. Taking a cue from Laozi, the Daoist sage, Ma and several disciples—Ma Yingcai, Ma Jianyuan, and Ding Zhonghe—went on a hajj to Mecca in 1905. They were stuck in Samarkand, and spent three years teaching among the Baishan Sufis. Ma Yingcai died on the journey.
Xidaotang
In 1909 Ma and the survivingdisciples were welcomed back to Lintan by Ding Quande and his son Ding Yongxiang. Ma opened a school called the Xidaotang. He felt strong attachment to Chinese culture, and when Qing fell in 1912, the Xidaotang men cut their queues and the women unbound their feet.
Death
In 1914, the Khafiya Sufi general Ma Anliang tried to exterminate the Xidaotang and Ma. Ma's Arabic name was Ersa. Westerners called him "Prophet Jesus". Ma Anliang was jealous of the Xidaotang's success, so when the bandit Bai Lang attacked Gansu in 1914, Ma Anliang seized it as an excuse. His troops seized and shot Ma and 17 of his family and followers on the west river.