Ma Anliang was a Hui born in Hezhou, Gansu, China. He became a general in the Qing dynasty army, and of the Republic of China. His father was Ma Zhan'ao, and his younger brothers were Ma Guoliang and Ma Suiliang 馬遂良. Ma was educated in Chinese and Islamic education. His Muslim name was Abdul Majid.