Ma Yuanzhang (Xiao'erjing: ﻣَﺎ ﻳُﻮًا ﺟْﺎ, simplified Chinese: 马元章; traditional Chinese: 馬元章; pinyin: Mǎ Yuánzhāng; Wade–Giles: Ma Yüan-chang) was a Chinese Sufi master, of the Jahriyya menhuan (Naqshbandi Sufi order).
When Agui defeated Su Forty-three and the New teaching in 1781, The family of Ma Mingxin was exiled to Yunnan. where they lived in the western Muslim community, converting the Yunnan Muslims to the Jahriyya sect. Ma Yuanzhang's father, Ma Shilin, travelled from Yunnan to Ningxia to visit Ma Hualong two times. After Du Wenxiu rebelled in the Panthay Rebellion, Ma Shilin joined him as a garrison commander and civil official. He defended Donggouzhai fort a year against Qing, then committed suicide. Ma Shilin's son Ma Yuanzhang and his other sons went to Sichuan.
Ma Yuanzhang searched for surviving children of Ma Hualong. Few of Ma Hualong's family survived the massacre at Jinjipu. Two his grandsons, Ma Jincheng and Ma Jinxi, were sentenced to castration upon reaching the age of 12. Ma Jincheng ended his days as a eunuch slave in Kaifeng in 1890, although the new Jahriyya leader, Ma Yuanzhang (the 1850s - 1920), managed to secretly provide him with some support until his death. The younger grandson, Ma Jinxi, was spirited away, intact, from his Xi'an confinement by Ma Yuanzhang, and was hidden at a Hui household in Hangzhou. Many years later, Ma Yuanzhang managed to obtain a pardon for Ma Jinxi, and Ma Hualong's grandson returned to Ningxia. A split within the Jahriyya followed, with some members becoming followers of Ma Jinxi, and others holding for Ma Yuanzhang (who claimed descent from the order's founder Ma Mingxin, and was also related to Ma Hualong's family through his marriage).